Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Need Help with MDX Query .. Expand / Collapse
Author
Message
Posted Tuesday, December 18, 2012 2:43 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 7:37 PM
Points: 384, Visits: 2,320
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
Post #1397627
Posted Tuesday, December 18, 2012 3:12 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:28 PM
Points: 13,280, Visits: 10,155
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.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1397641
Posted Tuesday, December 18, 2012 3:21 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 7:37 PM
Points: 384, Visits: 2,320
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
Post #1397647
Posted Tuesday, December 18, 2012 3:24 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:28 PM
Points: 13,280, Visits: 10,155
Your date dimension should have a Year attribute.
Just put the year attribute on one axis and the measure on the other.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1397649
Posted Tuesday, December 18, 2012 3:33 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 7:37 PM
Points: 384, Visits: 2,320
Thanks.. Will try and let you know ..


Thanks,
Chinna

Its the Journey which gives you Happiness not the Destination-- Dan Millman
Post #1397653
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse