I have the below MDX query from which i have the attached Dataset result ..Is there any way to get a new row with value as Australia under State and sum up all the state values for those month in the attached resultset...Thanks in advance
WITH
MEMBER [Measures].[Month_to_Show] AS CASE WHEN [Date].[YQM].CURRENTMEMBER.MEMBER_CAPTION = "2011" THEN "2011 AVERAGE" ELSE [Date].[YQM].CURRENTMEMBER.MEMBER_CAPTION END
MEMBER [Measures].[Year_2011_AvgUnits] AS SUM([Date].[YQM].[Year].&[2011],[Measures].[Exf Units])/10
MEMBER [Measures].[Share] AS CASE WHEN [Date].[YQM].CURRENTMEMBER.MEMBER_CAPTION = "2011" THEN 1 ELSE [Measures].[Exf Units]/[Measures].[Year_2011_AvgUnits] END
MEMBER [Measures].[Units] AS CASE WHEN [Date].[YQM].CURRENTMEMBER.MEMBER_CAPTION = "2011" THEN [Measures].[Year_2011_AvgUnits] ELSE [Measures].[Exf Units] END
SELECT
NON EMPTY { [Measures].[Month_to_Show],
[Measures].[Units],
[Measures].[Share],
[MEASURES].[Year_2011_AvgUnits] } ON COLUMNS,
NON EMPTY ( {[Date].[YQM].[Year].&[2011], [Date].[YQM].[Month]} ) ON ROWS,
{[Product].[Product Name].[Product Name]* [Account].[Ora Acct State].[Ora Acct State] } ON PAGES
FROM (SELECT ( {strtoset(@Year),[Date].[YQM].[Year].&[2011]}, strtoset(@Product)) ON COLUMNS FROM [CUBE]
Product Name | State | Yr | Qtr | Mnth | Mnth to show | Units | Share | Year_2011_avgunits |
TEST | NSW | 2011 | null | NULL | 2011 year average | 1000 | 1 | 1000 |
TEST | NSW | 2011 | qtr1 | Jan-11 | January | 516 | 0.53 | 1000 |
TEST | NSW | 2011 | qtr1 | Feb-11 | Febuary | 660 | 0.67 | 1000 |
TEST | NSW | 2011 | qtr1 | Mar-11 | march | 729 | 0.75 | 1000 |
TEST | NSW | 2011 | qtr2 | Apr-11 | april | 803 | 0.75 | 1000 |
TEST | NSW | 2011 | qtr2 | Jun-11 | May | 804 | 0.82 | 1000 |
TEST | NSW | 2011 | qtr2 | Jul-11 | June | 829 | 0.85 | 1000 |