1 Reply Latest reply on Aug 11, 2016 4:35 PM by diego.medrano

    MDX query for YTD and Same Period Last Year

    shirin merani

      Hi,

       

      I am connecting to Microsoft Analysis Services Cube , for reporting I need to Show Amount For Year Till Date and Same Period Last Year . Also the same has to be dynamic.

      Example : YTD Amount should be January 2016 till 7 July 2016 and Same Period Last Year Amount should be January 2015 till 7 July 2015

       

      I am not aware how should I create the calculated member (MDX query) to get the correct output. After searching a lot online I do get some query syntax but it gives me null output.

       

      Also The Date Hierarchy That I have has the Last Value as Month Name and the output of it is like January 2016. There is no date member available in the Cube.

       

      Getting the output if I create a hard corded MDX as below

      Current YTD Sum(([January 2016]:[July 2016]),[Measures].[Amount])

       

      Any help would be appreciated.