Ho to calculate YTD to get data upto current month

  • Hi i created an ssrs report using mdx queries

    in that i have to calculate YTD to calculate data upto current month

    i wrote below query

    MEMBER [Measures].[YTD] AS (SUM([Date].[Fin Year Month Name].&[01April]:[Date].[Fin Year Month Name].&[07October],[Measures].[Amount]))

    but i want dynamical updation i.e., for next month it has to take upto november

    can any one please suggest me how to do this....

  • There are a couple of ways to achieve this, depending on the setup of your date dimension. Have a look at the YTD and PERIODSTODATE functions:

    http://msdn.microsoft.com/en-us/library/ms146039.aspx

    http://msdn.microsoft.com/en-us/library/ms144925.aspx

    This is a common use for MDX so if you google it you will find absolutely loads of examples.


    I'm on LinkedIn

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply