Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Variable from complex calculation expression

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?



2 Replies

Re: Variable from complex calculation expression

There are differences in the way you create the variable, with or without an equal sign.

Please check


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).

Contributor III

Re: Variable from complex calculation expression

Did you try using Dollar sign expansion.

Your first test would be a straight table with no dimensions and your variable expression


In general i find that variables only work in some cases, while dollar sign expanded variables always works.

Best wishes

Community Browser