Variables – making your life easier
Variables are one of the most flexible elements in the QlikView realm. As we have seen throughout the book, you can use them as part of your script, the navigation schema or as a mechanism for the user to interact with the app. Likewise, they can help you standardize your dashboards by creating consistent color palettes or speed up your development by making it easier to create new calculations.
Formulas and Set Analysis
Stunning dashboards are not only functional, user friendly, and eye catching, but also robust and easy to maintain. One of the benefits of using variables in a QlikView app is that you can encapsulate common calculations. For example, imagine that you are dealing with an expression such as this one:
=sum({$<Category={'A', 'B', 'C'}, Cancelled={0}>} Sales)
Instead of copying and pasting it onto several charts time and again, you can create a variable called vSales
to store it. Now, whenever you need to use it, you just have to type the...