Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi i have the following calculation which i wish to transform into a variable;
sum([Förs pris] * "Förs-kurs" * [Ursprungligt antal] * (1 + OrderRad_Rabatt) * (1+ OrderHuvud_Rabatt))
i have tried creating the variable but am unable to reuse it in any expression, have i done something wrong?
Best,
Brad
There are differences in the way you create the variable, with or without an equal sign.
Please check
http://www.qlikfix.com/2011/06/08/not-all-variables-are-created-equal/
It also important, in which context you want to use the variable. Are you using it within an aggregation function like sum? If your variable expands to text, this will not work, since an aggregation function like your sum() is not allowed within another aggregation function without using advanced aggregation (i.e. the aggr() function).
Did you try using Dollar sign expansion.
Your first test would be a straight table with no dimensions and your variable expression
$(vVariable)
In general i find that variables only work in some cases, while dollar sign expanded variables always works.
Best wishes