Need Help with MDX Query ..

  • I need to write an MDX query where i can get the totals for all existing years plus the YTD for current year.

    Our company year starts from month: December and ends in November..

    Right now our cube has data from year: 2010(November 2009)

    So i need to get the total number of sales or units for each year and YTD for year 2013..

    Product 2010 2011 2012 2013(YTD)

    P1 1320 2121 2112 100

    Any guidance would be really helpful..

    Thanks,
    Chinna

    Its the Journey which gives you Happiness not the Destination-- Dan Millman

  • How is your cube designed? Normally when you have facts linked to your date dimension, you automatically get the YTD for the last year when you browse on the year level.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Yes it is linked .. So when i browse the cube i am able to get that .. but how do i get it using MDX query so that i can display in the report ?

    Thanks,
    Chinna

    Its the Journey which gives you Happiness not the Destination-- Dan Millman

  • Your date dimension should have a Year attribute.

    Just put the year attribute on one axis and the measure on the other.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Thanks.. Will try and let you know ..

    Thanks,
    Chinna

    Its the Journey which gives you Happiness not the Destination-- Dan Millman

Viewing 5 posts - 1 through 4 (of 4 total)

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