Need Help on MDX Query..

  • I have grouped by state and now i want the totals in the same dataset for country which is nothing but total of all states...Can you please help me with that..

    Thanks,
    Chinna

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

  • Not sure I really follow you issue.

    Do you have MDX you can share - it might make your issue easier to visualise?

    Mack

  • 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]

    Thanks,
    Chinna

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

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

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