posted 2/5/2010 4:28:14 PM by DustinRyan
Today I was working on a report built on a cube and stumbled on to an interesting requirement by some of our client's end users (EU). EU wanted to be able to consolidate multiple, specific members into a single parameter value. For example, if EU selected the parameter item A, they should see all members in the report where the value is actually 1 A and 2 A. So by selecting a single parameter value, EU will have actually selected 2 parameter values and will see the associate members in the report.
With a little brain storming, I came up with an easy way to accomplish this without having to mess around with the MDX, due to the fact that my MDX skills are quite lacking.
Note: This solution is only feasible if you only have a couple of possible values in your parameter. If you need to have more than a couple options in your parameter, you'll probably want to figure something else out.
So open the properites of the parameter you are working on. Instead of using a query to determine available values, you'll need to specify the available values in the report. This is the reason why if you have data that is constantly changing in the cube related to this report or you have more than a few values, you're going to have to figure something else out.
Here you can see how I specified my values for the parameter:
For Parameter A, I used this expression to select both members associated with A:
"( { [Test].[Class].&[1]&[A], [Test].[Class].&[2]&[A] } )"
And for B:
"( { [Test].[Class].&[1]&[B], [Test].[Class].&[2]&[B] } )"
Since this parameter cannot be a multivalue parameter, I specified a parameter value of "All" so the user can still see both A and B at the same time. Here is that expression:"( { [Test].[Class].&[1]&[A], [Test].[Class].&[2]&[A], [Test].[Class].&[1]&[B], [Test].[Class].&[2]&[B] } )"
In this way, I'm able to actually select multiple members with a single parameter value. I hope someone finds this helpful.
DustinRyan (Member since: 11/2/2009 4:00:04 PM) I am a consultant, developer, product support tech, trainer, and hitman/ ninja assassin for Pragmatic Works. Working with the amazing and versatile crew at Pragmatic Works allows me to learn new things daily and increase my knowledge at an exponential rate! Lately, I've spent most of my time developing business intelligence solutions for clients that involve SSRS, SSIS, and SSAS.
View DustinRyan 's profile
Leave a comment
It's fast, easy and free! Submit articles, get your own blog, ask questions & give answers in the forums, and become a better developer, faster.
enter your email address: