Showing posts with label base. Show all posts
Showing posts with label base. Show all posts

Friday, March 9, 2012

Dynamic field base on parameter

Hi,

I have a matrix based on a cube. I would like to load up a field based on the selection of a parameter.

The parameter values has, Actual, Budget, Target

For the one field, base on the above parameter, will select,

if the value for the parameter is Actual, then =Fields!Actual.Value

if it's Budget, then =Fields!Budget.Value

if it's Target, then =Fields!Target.Value

Is this possible? And If so, how should I do it?

Thanks a lot.

You can try

=IIF(Parameters!<ParamName>.Value="Actual", Fields!Actual.Value, IIF(Parameters!<ParamName>.Value="Budget", Fields!Budget.Value, Fields!Target.Value))

|||

hi,

thanks a lot for your reply.

But what if I loaded the parameter list from the database, that means there maybe more option later in the course, what can I do in that case?

|||You can try using this syntax =Fields(Parameters!<paramName>.Value).Value.|||thanks a lot for your great help... that works!

Dynamic Dimension Security using something else than ROLES

We are incorporating some OLAP cubes into our secure website and what to restrict the cubes information base on the person or client logged in. We are using Dundas OLAP as the front end for displaying the cubes. The Roles approach is not a viable solution since it is impossible for us to gather and keep track of our client’s windows usernames.

Is there a way to somehow pass a value through the control or the connection string and later use this value to filter dimension members?

> Is there a way to somehow pass a value through the control or the connection string and later use this value to filter dimension members?

Yes, there is a connection string property called "Roles", where you can specify which Roles should be used.

|||

I did a little bit of digging on connection string properties and came across this in one of your blogs.

There is a new MDX function for SSAS 2005 called “CustomData”.

http://sqljunkies.com/WebLog/mosha/archive/2005/10/11/mdx_functions_as2005.aspx

I am using the “Roles” and “CustomData” properties of the connection string to achieve my purpose.

Thanks Mosha