sql - Adding a filter to a MDX query -


I'm new to SSAS and what would be equal to a segment in SQL and I'm sure that an MDX is easy for regular Answer:

I have this pulling value for a multi-selected parameter list in Report Builder but I have to filter the contracts based on the user's project which is currently viewing. Here is the query that is pulling all values ​​correctly. [Remedy] with a member of

  [DimContracts] as [ParameterCaption]. [ContractName] .CURRENTMEMBER.MEMBER_CAPTION member [remedy]. [DimContracts] as [ParameterValue]. [Contract name] .CURRENTMEMBER .INIQUENAME selection {[remedy]. [ParameterCaption], [remedy]. [ParameterValue]} columns, [dimContracts]. From [contract name] [cubeProjectEntities]  on the rows .Children 

I need to add what will happen:

  WHERE dimContracts [Project ID] = 1  

What I have added that produces the right filter set but from here I do not know how to use the report parameter to do this work. Every time I do the test it just gives and empty dataset. I have the parameter just printing on the page, so I know that it is set correctly.

  WHERE [dimContracts] [Project ID]. [1]  

This does not work:

  WHERE [dimContracts]. [Project ID]. [@ Project ID]  

And then in Report Builder, I will pass the parameter in the query to change 1 for @projectId

Thanks for any help!

  [measure] with member [dimContracts] as [ParameterCaption]. [ContractName] .CURRENTMEMBER.MEMBER_CAPTION member [remedy]. [DimContracts] as [ParameterValue]. [Contract name] .CURRENTMEMBER.UNIQUENAME selection {[remedy]. [ParameterCaption], [remedy]. [ParameterValue]} columns, [dimContracts]. [Contract name] on rows from [cubeProjectEntities] .Children Where (STRTOMEMBER (@projectid))  
A

In MDX, where the segment is Slicer. Here is a good article about the difference between SQL and MDX using the SSRS parameter with MDX queries. You can actually tell the whole member's name instead of just the value (example: [DimContracts]] Query. [Project ID]. [1] )


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -