Translate Trailing 12 Months CalcScript to MDX
Hello
Hello experts, I have to create some new periods (dynamic calcs) in PBCS application to calc Last twelve months and I have to do with calc script and MDX (ASO cube)
These codes that I'll show you are working but I would like to know if I can optimize ASO code:
I have to apply just in some group of dimension accounts (Net Profit and Balance)
Example with February:
Calc Script:
Feb_LTM:
IF (@ISMBR(@IDESCENDANTS("Net Profit")) OR @ISMBR(@IDESCENDANTS("BALANCE")))
@SUM("Jan":"Feb")+@SUMRANGE(@MEMBER(@PREVSIBLING(@CURRMBR("Year"))),"Mar":"Dec");
ENDIF
MDX:
Feb_LTM:
CASE
WHEN IsAncestor ([Net Profit], [Account].currentmember, includemember) or IsAncestor ([BALANCE], [Account].currentmember, includemember)
Tagged:
0