Search code examples
ssrs-2008ssaswhere-clausemdxreporting-services

SSRS MDX Where Clause Issue


I have a little Problem with a MDX-Query.

I want show all the Claim Costs, divided in Types and with a certain DocumentType.

Here is my Code:

    select
    {
        [Measures].[Claim Count],
        [Measures].[Claim Cost Position Count],
        [Measures].[Claim Cost Original],
        [Measures].[Claim Cost Original Average],
        [Measures].[Claim Cost Possible Savings],
        [Measures].[Claim Cost Possible Savings Average],
        [Measures].[Claim Cost Possible Savings Percentage]
    } on 0,
    NON EMPTY{
        [Claim Cost Type].[Claim Cost Type].[Claim Cost Type].Members
    } on 1
    from
        Cube    
where 
    (
        ( {StrToMember(@DateFrom) : StrToMember(@DateTo ) } )
         ,[Claim Document Type].[Document Type].&[1] 
    )

I have four Document Types: 1 - 4

I want to show only the data of three first Documenttypes.

I tried the following Where-Clause:

where 
(
    ( {StrToMember(@DateFrom) : StrToMember(@DateTo ) } )
   ,( {[Claim Document Type].[Document Type].&[1] : [Claim Document Type].[Document Type].&[3]} ) 
)

But it shows me only the Data of the Documenttype 1 and 3, not 1 to 3.

Can anybody help me?

Thank you very much and sorry for my bad English!

Alex


Solution

  • Maybe the OrderBy property of [Document Type] attribute is not equal to "Key"? In this case it is necessary to use

    {[Claim Document Type].[Document Type].&[1],
     [Claim Document Type].[Document Type].&[2],
     [Claim Document Type].[Document Type].&[3]}