1
votes

I am very beginner in MDX query,

I created a SSRS report which uses MDX query, the report has to pull based on date range. I used where clause and used range like

where [Date].[Month].&[200609] : [Date].[Month].&[200710]

I have to pass these 2 values from parameter, created 2 parameter @from and @to and set value in query designer. Now when I use @from : @to I am getting an error. I would be sure I have to use some function like strtomember or so. Please guide

1

1 Answers

1
votes

The value of your parameter must have a string with the Date dimension hierarchy

Example where clause:

Where STRTOMEMBER(@From) : STRTOMEMBER(@To)

@From value should be a string like this:

[Date].[Month].&[200609]

When you create the parameter set as Text, set available values tap like this:

enter image description here

In value put the following expression:

="[Date].[Month].&[200601]"

Note the label is the caption you want to show in report selector. Also You can set these values using a query.

Let me know if this was helpful.