Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
RMQLIKUSER
Contributor II
Contributor II

Variable with set analysis function throws error while using in the table

Hi,

I have created a variable using set analysis function, which evaluated based on user function.

Var1 = '=only({<Month={' & '$' & '(=GetFieldSelections(Months))}>}Price)';

This variable evaulates the expression and assigns a value. $(Var1) = 10

I want to use the same variable as a measure field in a table but it throws an error.

Load

$(var1) as Price

Is this the right way to call a variable in the script.

 

3 Replies
Kushal_Chawda

Your formula uses set analysis , hence it can't be run in script as it will only work in measure in front end.  Also your using GetFieldSelections functions inside the set which is again specific to front end and can't be run in script.

Based on your requirement may be we can suggest the other way to fulfill your requirement

RMQLIKUSER
Contributor II
Contributor II
Author

Sure. Is there any other way to create this variable which can be further used in a table to re-calculate the final price.

The variable should change every time the user selects a month.

Kushal_Chawda

Well variable can be created in many ways but it depends on the scenarios.

Would you able to provide the example of what exactly you want to do?