Can we Implement YTD using MDX syntax in olap universe.


I am trying to implement YTD prompt from universe level. Can any one suggest how can i implement it using MDX syntax in olap universe.


Anil Kumar.

  • SAP Employee


In MDX, you need to generate the technical name to have you expression valid.

Moreover the correct syntax is: SUM(MTD(member),measure)

So in your case the prompt must be constrained on the technical name and cannot be free, the correct syntax is:

 SUM(MTD(@Prompt('YYYYMM','A','Cal. year / month\L01 Cal. year / month',mono,primary_key)),
@(Select(Key Figures\Total Variance)) 

Last, the result will be not really significant because you are asking for a MTD with a Year-Month as time member: the result will be the measure value for the selected month.

In your case you need to have a time series function for an upper level like YTD or QTD. If you want to use MTD, the the time member selected would be at a lowest level, such as week or day.



0 View this answer in context