MDX query using hierarchy gives Subtotals

  • Hi,

    I don't have a background in MDX queries so I may be missing an obvious point here.

    I have a MDX query which includes a hierarchy in the ROWS section. When I execute the query (in SSRS) the records that get returned include the Totals for each level in the hierarchy. Is there any way to stop this from happening? At the moment numbers are being multiplied in the report because they are also being totalled in the MDX query.

    Thanks in advance for any suggestions.

    A simplified version of the code is below:

    SELECT

    {

    [Measures].[Gross]

    } ON COLUMNS

    ,

    NON EMPTY

    {

    [DimDate].[Hierarchy - Fiscal Day].MEMBERS*

    [DimLocation].[Location Code].[Location Code].ALLMEMBERS*

    [DimLocation].[Location Description].[Location Description].ALLMEMBERS

    }

    DIMENSION PROPERTIES

    MEMBER_CAPTION

    ,MEMBER_UNIQUE_NAME

    ON ROWS

    FROM

    (

    SELECT

    StrToSet

    (@Region

    ,CONSTRAINED

    )

    ON COLUMNS

    FROM

    (

    SELECT

    StrToMember

    ('[DimDate].[Fiscal Day Of Year].&[1]'

    ,CONSTRAINED

    )

    :

    StrToMember(@DimDateFiscalDayOfYear) ON COLUMNS

    FROM [SourceCube]

    )

    )

    WHERE ( [DimTransactions].[Void].&[0] )

    CELL PROPERTIES

    VALUE

    ,BACK_COLOR

    ,FORE_COLOR

    ,FORMATTED_VALUE

    ,FORMAT_STRING

    ,FONT_NAME

    ,FONT_SIZE

    ,FONT_FLAGS;

  • It's because you are not suppressing the ALL member of the hierarchy. Try using [DimDate].[Hierarchy - Fiscal Day].CHILDREN instead.


    I'm on LinkedIn

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

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