Page 1 of 1

TM1 Dynamic Subsets

Posted: Tue Mar 24, 2015 7:20 pm
by manu0521
Hi ,

We have many subsets used in our TM1 environment. Say most of the subset will work on getting the last level elements from the dimension.

Since data will change every day I want to write a process to update all these subsets data.

SO I will have a separate cube which has all dimension subset names and MDX expression as values.

Now I need a TI process to automatically create the dynamic subset with this cube as a source.

First I will have update the Dimension subset name to include any new subsets that are added and then add the mdx expression and dimension name to the cube.
Once this is done I need to create a temporary subset for all the subset names and then copy the contents from there to the existing subset names.

How do I make this last part , work of creating a temp subset and then copying its content to the existing subset. Do I write it in a loop .

Can you guys suggest me on how to approach this or a sample code

Thanks,
Manu

Re: TM1 Dynamic Subsets

Posted: Tue Mar 24, 2015 8:41 pm
by declanr
Depending on what you are using the subsets for you can just leave them as MDX expressions without too much of a performance hit and then not bother with recreating them all the time.

However if on testing you find that you do need the subsets to actually be static for performance then yes you can either:
1/ Loop a temporary MDX subset (using subsetgetsize and subsetgetelementname) then move it into a static subset
2/ Delete the existing subset; create an mdx subset in its place; then just make a small tweak (e.g. remove and re-add the last element) to make it static.

Re: TM1 Dynamic Subsets

Posted: Thu Mar 26, 2015 4:34 am
by hiraniha
Take a look at this link, you may be able to utilse the functions to achieve what you are after

http://www-01.ibm.com/support/docview.w ... wg27042401

Re: TM1 Dynamic Subsets

Posted: Thu Mar 26, 2015 10:39 am
by declanr
hiraniha wrote:Take a look at this link, you may be able to utilse the functions to achieve what you are after

http://www-01.ibm.com/support/docview.w ... wg27042401
Useful functions but the OP's version is stated as 9.5 and sadly the functions have only recently been introduced so you would have to go "old school" in approach.

Re: TM1 Dynamic Subsets

Posted: Thu Mar 26, 2015 10:26 pm
by hiraniha
Hi declanr,

My bad, didn't spot that !!!


hiraniha