TM1 Dynamic Subsets

Post Reply
manu0521
Posts: 124
Joined: Wed Nov 26, 2014 8:32 pm
OLAP Product: IBM TM1, Planning Analytics
Version: PA 2.0.5
Excel Version: 2016

TM1 Dynamic Subsets

Post 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
declanr
MVP
Posts: 1815
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: TM1 Dynamic Subsets

Post 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.
Declan Rodger
hiraniha
Posts: 17
Joined: Thu Jul 05, 2012 3:27 am
OLAP Product: TM1
Version: 10.2.2 FP1
Excel Version: 2010

Re: TM1 Dynamic Subsets

Post 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
regards

hiraniha
declanr
MVP
Posts: 1815
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: TM1 Dynamic Subsets

Post 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.
Declan Rodger
hiraniha
Posts: 17
Joined: Thu Jul 05, 2012 3:27 am
OLAP Product: TM1
Version: 10.2.2 FP1
Excel Version: 2010

Re: TM1 Dynamic Subsets

Post by hiraniha »

Hi declanr,

My bad, didn't spot that !!!


hiraniha
regards

hiraniha
Post Reply