I am trying to calculate the Gross Profit %, the formula works good for time perspective base, however when I choose TTM it gives weird results. So i decided to create a MDX which calculates the Margin based on whether it is base or TTM, but it is not working. Can anyone advise on the syntax.
If you are creating the formula in the accounts dimension, you may need to have 2 GP % accounts,
one for Base (using the first part of your formula), and
one for TTM (using the above formula).
FYI, the IF condition syntax for Time Perspective is
IIF([Time Perspective].[Default].CurrentMember IS [Time Perspective].[Default].&[BASE]
Feel free to let me know if you have any further questions.