|
|
|
SSChasing Mays
      
Group: General Forum Members
Last Login: Today @ 8:51 AM
Points: 608,
Visits: 1,856
|
|
Hi,
I'm trying to something that I think should be straight forward in MDX but i'm struggling. I'm new to MDX so it seems trivial but may not be....
Consider the following query:
SELECT [Measures].[Thing Count] ON 0, YTD([Effective Date].[Year-Week].[Week].[2013 Week 6]) ON 1 FROM [Cube] This gives me a result set that shows as per the attached. All i really want though is the SUM of the rows. How do i do that? It's driving me nuts because i'm sure it's a piece of cake.
Thanks,
Simon
Follow me on Twitter: @WazzTheBadger LinkedIn Profile: Simon Osborne
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 3:58 AM
Points: 117,
Visits: 458
|
|
Try something along the lines of
With Member [Measures].[Thing Count YTD] As
Sum(YTD([Effective Date].[Year-Week].CurrentMember) , [Measures].[Thing Count] )
SELECT [Measures].[Thing Count YTD] ON 0, [Effective Date].[Year-Week].[Week].[2013 Week 6] ON 1 FROM [Cube]
Mack
|
|
|
|
|
SSChasing Mays
      
Group: General Forum Members
Last Login: Today @ 8:51 AM
Points: 608,
Visits: 1,856
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 4:43 PM
Points: 192,
Visits: 640
|
|
Try this also...
With Member [Measures].[Thing Count YTD] As
AGGREGATE(YTD([Effective Date].[Year-Week].CurrentMember) , [Measures].[Thing Count] )
SELECT [Measures].[Thing Count YTD] ON 0, [Effective Date].[Year-Week].[Week].[2013 Week 6] ON 1 FROM [Cube] This keeps whatever it is you are counting from being double counted.
|
|
|
|