Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello community. I need help passing parameters to set analysis expression called by FirstSortedValue function. Here is my scenario:
I have an island table:
%Measure_Nbr | %Measure_Formula |
1 | Sum({<$1, $2>} DOLLARS) |
2 | Sum({<$1, $2>} UNITS) |
3 | Sum({<$1, $2>} DOLLARS)/Sum({<$1, $2>} UNITS) |
%Measure_Formula has parameter ( $1), ($2) for different set analysis that I will pass as variables. For example:
saProductJuice = [Product] = {‘Juice’}
saCountryUSA = [Country] = {‘USA}
When I pass one of those variables as parameters, result should be different variations of measures and set analysis. Something like this :
Sum({<[Product] = {‘Juice’}>} DOLLARS)
or Sum({<[Product] = {‘Juice’}, [Country] = {‘USA}>} UNITS)
In my chart, I use following variable to call measure:
vExpression = FirstSortedValue({1} %Measure_Formula, %Measure_Nbr,$1) – Where $1 is another parameter specifying measure I want.
So here is a problem I need help with:
Result of $(vExpression(1)) returns Sum({<$1, $2>} DOLLARS)
But I can’t pass more parameters for my set analysis inside of expression. I need something like Sum({<[Product] = {‘Juice’}>} DOLLARS) when I execute FirstSortedValue.
Please help and thank you.
I hope this would be helpful for you: Nesting Variables with parameters.
- Marcus