
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Variable Query
Just want to double check my understanding regarding variable
1) when variable definition in variable overview is prefixed with = it means variable will be calculated once in a data model and whenever variable will use it will use the same value.
2) if variable is not prefixed with = ...calculation of variable will depend on the expression where is it used ..may be static or dynamic depends..
please correct me if my understanding is wrong
Many Thanks
- Tags:
- new_to_qlikview
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pooja,
When you have a = Prefix like '=sum(sales)' - this will calculate the result first (and once only) and ignores the dimensions in the chart object where you are going to use this variable in an expression.
If you dont use the = prefix then the dimension of the chart object is taken into account...that means - the calculation within the variable is done afterwards.
Please have look at this screenshot to clarify the difference:


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pooja,
When you have a = Prefix like '=sum(sales)' - this will calculate the result first (and once only) and ignores the dimensions in the chart object where you are going to use this variable in an expression.
If you dont use the = prefix then the dimension of the chart object is taken into account...that means - the calculation within the variable is done afterwards.
Please have look at this screenshot to clarify the difference:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
Go through these interesting blog posts.
http://community.qlik.com/blogs/qlikviewdesignblog/2013/11/04/the-magic-of-variables
http://community.qlik.com/blogs/qlikviewdesignblog/2013/11/18/dollar-expansions
Regards
ASHFAQ
