Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
If you creates a variable with the name x and the content of: sum(AnyValue) without using a leading equal-sign you could use $(x) as expression within the chart as if you have typed sum(AnyValue) there.
- Marcus
I assume that your variable begins with a equal-sign "=" which meant that the expression will be calculated and the result will be stored within the variable. See for this: The Little Equals Sign.
- Marcus
how you have defined variable?
Hi Marcus,
Thank you for your reply. My variable begins with the sign = so it calculates the expression and it is not considered as a text (as I understood it from the link you gave me).
It looks like the variable calculates one value and applies it to all the dimensions, even if the variable is created with Let statement.
Hi Shradda, my variable is defined with a Let in a scipt, and looks like this:
=Count( {$< [Field_1]={1},[Field_2] ={1}, [Field_3]={1}> }distinct Field_4)
Yes, that's right. By a variable-declaration beginning with the equal sign or within the script per LET will be at first evaluated and only the result of them is stored within the variable and of course each call of the variable has then the same return-value.
- Marcus
Ok, I understand it right now. But does it mean that it is not possible to use variables in bar charts (or other objects with several dimensions), or is there a way to make it work?
If you creates a variable with the name x and the content of: sum(AnyValue) without using a leading equal-sign you could use $(x) as expression within the chart as if you have typed sum(AnyValue) there.
- Marcus
Thank you Marcus, it works perfectly 🙂