Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem using Variable in a Dimension, Help on Set Analysis

HI Guys,

I have a dimension that I want to limit using Set Analysis that compares dimension to a Variable.

This code is not working:

Only({$<ProjectName = {$(vTargetProject)}>} ProjectName}

Also I not sure in using ONLY as function since IF function did not supports set analysis.

Thanks!

1 Solution

Accepted Solutions
Not applicable
Author

Hello,

If you wan't limit the dimension using the calculate dimension you can use that :

=Aggr(Maxstring ({$<ProjectName = {"$(vTargetProject)"} >} ProjectName),ProjectName)

If you wan't limit the dimension using the expression you can use that :

=Sum ({$<ProjectName = {"$(vTargetProject)"}>} [My Measure])

View solution in original post

5 Replies
Not applicable
Author

maybe if(vTargetProject = ProjectName, ProjectName)

Not applicable
Author

Hello,

If you wan't limit the dimension using the calculate dimension you can use that :

=Aggr(Maxstring ({$<ProjectName = {"$(vTargetProject)"} >} ProjectName),ProjectName)

If you wan't limit the dimension using the expression you can use that :

=Sum ({$<ProjectName = {"$(vTargetProject)"}>} [My Measure])

Miguel_Angel_Baeyens

Hi,

I guess that your ProjectName field is alphanumeric, so you need to quote it in set analysis

Only({< ProjectName = {'$(vTargetProject)'} >} ProjectName)


If vTargetProject has many values, you wil need to concatenate and quote them.

Is this the case?

Not applicable
Author

HI

Nadsky

I have tried the same with the help of If statement.....

What you have to do is Add Following If statement in dimension.

if(Field_Name = '$(variable_name)',Field_Name)

After doing these He may Show you entry showing ' - '

To hide that you have to just check on "Suppress When Value is Null"

Try it and let me know if these is working in your application, if not we will find some other solution.....

Regards,

Kaushik

Not applicable
Author

Hello to all,

Thanks for the quick response.

I'm able to solve my problem using PICARD's solution. I just removed the quotes in a variable.

Also Thanks to Kaushiksolanki for the idea of suppressing null values.

Thanks to all!

regards,

Nadsky