Qlik Community

QlikView Documents

Documents for QlikView related information.

Dynamic Field Expressions with Variables

Valued Contributor

Dynamic Field Expressions with Variables

It happens to me all the time that I'm requested to give users the possibility to select which metric they want to see or use in all the graphics and objects. In order to fulfill that requirement I use variables. This method makes it easier to create, maintain and reuse the expressions across multiple objects. Nonetheless, what I like the most about this approach is that it also allows me to camouflage this kind of "hard requirement" and make it look as a natural component of the application.

I must say that I started to use this method long before hic posted his marvelous explanation about variables in "The Magic of Variables". But it wasn't until I read that post that I completely understood how variables work and how we can use them at its full potential.

So, the following link will take you to the zip file (.qvw and xlsx file) exemplifes a basic scenario of how you can use variables to switch the field that is used to calculate a metric across multiple objects.

Dynamic Field Expressions With Variables Files

I hope this example is useful and don't hesitate to ask if you have any doubt regarding it.

Version history
Revision #:
1 of 1
Last update:
‎02-19-2014 11:07 PM
Updated by: