Max Value
Posted: Wed Sep 12, 2012 1:00 pm
Hi,
I have tried the max function ans read this post: http://www.tm1forum.com/viewtopic.php?f=3&t=4207, but cannot manage to get this working.
I upload seconds per item for an invoice. I need to calculate adj seconds.
For the adjusted seconds I want to put the maximum seconds per item per invoice next to each item.
Item Seconds Adj Sec
A 5 7
B 3 7
C 7 7
The adjusted seconds for each item on invoice X will be 7 sec per item.
There are other dimension in cube as well but the link is invoice and item.
I have tried:
['Adj Sec']=N:MAX(['seconds']);
['Adj Sec']=N:
MAX(DB('Despatch_Stageing',!DC,!Invoice Number,!Equipment Type,!Branch,!Item,!Supplier,!Activity,'Seconds'));
['test sec adj']=N:
IF(ELLEV('Item',!Item)=0,
Max(DB('Despatch_Stageing',!DC,!Invoice Number,!Equipment Type,!Branch,!Item,!Supplier,!Activity,'Seconds')),continue);
Am I heading in the right direction or should I try something different.
I am not able to save any of these rules above.
Thank You in advance
I have tried the max function ans read this post: http://www.tm1forum.com/viewtopic.php?f=3&t=4207, but cannot manage to get this working.
I upload seconds per item for an invoice. I need to calculate adj seconds.
For the adjusted seconds I want to put the maximum seconds per item per invoice next to each item.
Item Seconds Adj Sec
A 5 7
B 3 7
C 7 7
The adjusted seconds for each item on invoice X will be 7 sec per item.
There are other dimension in cube as well but the link is invoice and item.
I have tried:
['Adj Sec']=N:MAX(['seconds']);
['Adj Sec']=N:
MAX(DB('Despatch_Stageing',!DC,!Invoice Number,!Equipment Type,!Branch,!Item,!Supplier,!Activity,'Seconds'));
['test sec adj']=N:
IF(ELLEV('Item',!Item)=0,
Max(DB('Despatch_Stageing',!DC,!Invoice Number,!Equipment Type,!Branch,!Item,!Supplier,!Activity,'Seconds')),continue);
Am I heading in the right direction or should I try something different.
I am not able to save any of these rules above.
Thank You in advance