tm1 rules C level and Ascii extract

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 rules C level and Ascii extract

Post by manu0521 »

Hi ,

I have a cube with 5 years of sales data at day level . I have a rule to calculate Revenue Per day at Month level(C) .

I have the below rule and feeder . I extract flat files from tm1 to asciioutput for few measures and when i do it for this rule based measure it takes a lot of time to extract data at month level.

Rule :

['Input Currency','H1 RPD']=C:IF((ELLEV('Time Period',!Time Period)=1 % ELLEV('Time Period',!Time Period)=2) & ELISANC('Time Period','All Calendar Years',!Time Period)>0,
['Full Revenue']\ATTRN('Months',ELPAR('Time Period',!Time Period,1),'Business Days'),0);

['Input Currency','H1 RPD']=N:IF(['Full Revenue']<>0,0.000000001,0);

Feeder:
['Full Revenue'] => ['H1 RPD'];

I create a view on the fly and then do a ascii output .
I dont have any other code in my ti process .

I think it takes more tiem becase of the rule calcualtion and feeders, is there a better way to write this rule .

Thanks,
burnstripe
Regular Participant
Posts: 197
Joined: Wed May 06, 2020 2:58 pm
OLAP Product: Planning Analytics
Version: 2.0.9
Excel Version: 2016

Re: tm1 rules C level and Ascii extract

Post by burnstripe »

Do you need to use the rule at c level to create your extract? If all you need is an export then just have a process that looks at the months and full revenue and then multiples the value by the weighting 0.00...1 and divides it by the number of business days.

If the c level rule really is needed.. Then consider some of these options

1) Make full revenue a child of h1 rpd with a weighting of 0.000000001. This both removes the need for a feeder from full revenue to h1 rpd and removes the requirement for the n level rule

2) we don't know how big the cube is but the cube dimensions may be in a suboptimal order

3) combine the ellev, do you need both ELLEV('Time Period',!Time Period)=1 and ELLEV('Time Period',!Time Period)=2 or could you combine them to just one condition ELLEV('Time Period',!Time Period)>0.

4) ['Full Revenue']\ATTRN('Months',ELPAR('Time Period',!Time Period,1),'Business Days')
This looks unnessary. Do you need elpar? Presuming your month naming matches that in you day dimension you shouldn't need to grab the parent of anything. A rule based on the area Mar 2020 for example would use Mar 2020 as the !Time Period for any calculations

5) ATTRN('Months',ELPAR('Time Period',!Time Period,1),'Business Days')
You may find a slight performance improvement using a dB statement against the }elementattributes_time period cube as opposed to using attrn

6) ELISANC('Time Period','All Calendar Years',!Time Period)>0
Is this necessary? If it is consider separating this to the other if statements to improve iteration times
C:IF((ELLEV('Time Period',!Time Period)>0 & ELISANC('Time Period','All Calendar Years',!Time Period)>0

Instead consider if this is possible
C:IF((ELLEV('Time Period',!Time Period)>0, continue, stet) ;
C: if(ELISANC('Time Period','All Calendar Years',!Time Period)>0, true, false)

7) a slight improvement maybe found if you also specify the dimension name with the element name so instead of
['Input Currency','H1 RPD']
Have
['dimensionname':'Input Currency','time period':'H1 RPD']

This should help you make some improvement. But there are still other steps on top of this you can take to minimise process/view calculation time
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

Re: tm1 rules C level and Ascii extract

Post by manu0521 »

Thanks a lot for all these suggestions, I will try to look in to them and see how it goes.
Post Reply