You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

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)

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!