February 3, 2011 at 6:10 am
Hi there
I need to build a report that allows users to choose two months for month on month comparisions (so two columns would appear on the report, for example, January and February). The data source is an SSAS cube.
I got this working by having one multi-valued parameter on the report, bound to the CalendarMonth attribute in my time dimension. The user ticks two different months in the parameter list and the two columns appear on the report side by side. However, there is nothing stopping the user from selecting a third column which would mess up some other logic I have in my report. So basically i want to allow them to pick only two months (doesn't matter which) to compare.
I assume I need two parameters (Month1, Month2) for example, and I need to bind both of these to my dataset somehow.
Any assistance would be greatly appreciated!!
Thanks
Doodles
February 7, 2011 at 12:12 pm
Make your existing parameter a single select. Then make another parameter that is virtually identical to the first with just a different name. Assuming the months do not have to be consecutive or have any constraints where the second month parameter should be dependant on the first.
Then in your dataset query do something like
WHERE Month IN (@MonthParam1, @MonthParam2)
Or whatever would be appropriate for your query and needs.
February 9, 2011 at 7:17 am
Thanks for that. It would have been the solution if I was using SQL as the data source, but I was using SSAS.
The solution was to basically modify the MDX query to accept the two parameteres for the same hierarchy (using STRSET and a comma-delimited string as the first argument).
Thanks
Doodles
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply