MDX parameter syntax

Who is online?  0 guests and 0 members
Home  »  Forums   »  microsoft business intelligence   »  reporting services   » MDX parameter syntax

MDX parameter syntax

Topic RSS Feed

Posts under the topic: MDX parameter syntax

Posted: 1/17/2012

Jedi Youngling 36  points  Jedi Youngling
  • Joined on: 10/11/2011
  • Posts: 8

Hello,

I have a dataset I am trying to pass an MDX value to. My value is:

=

"[DimDate].[Fiscal_Year].[Fiscal Year Name].&["& Parameters!DimDateFiscalYearName.Value &"]"

I have also tried:

=

"[DimDate].[Fiscal_Year].[Fiscal Year Name].&["+ Parameters!DimDateFiscalYearName.Value +"]"

When I try to run the report I get the following error:

"The Value expression for the query parameter xxx contains an error: Operator '&' is not defined for string "[DimeDate...]

Any ideas on why this doesn't work? Thanks in advance.

John


Posted: 1/17/2012

Jedi Knight 1789  points  Jedi Knight
  • Joined on: 11/25/2009
  • Posts: 43

Hello,

First of all what's parameter xxx? Is that supposed to reference the DimDateFiscalYearName?

The expression looks correct to me have you tried to use the label instead of the value? My last recommendation would be to go back and confirm how this

"[DimDate].[Fiscal_Year].[Fiscal Year Name].&["& Parameters!DimDateFiscalYearName.Value &"]"

value looks in the cube to make sure the format/layout is what you have in your expression.


Posted: 1/18/2012

Jedi Youngling 36  points  Jedi Youngling
  • Joined on: 10/11/2011
  • Posts: 8

Thanks Chris!

The Label option did not work either. I know I have done it this way in the past and all has worked properly.

So I tried something else. In the query, I used the 'Begins with' operator for the parameter instead of '='. So then I  simply used the parameter name in the Dataset Properties Parameter Value and all works well.

Regards,

John


Page 1 of 1 (3 items)