Defining variables in Qlik Sense®

For versions prior to v2.1.1, Qlik Sense does not provide the option to define variables outside the script as you could in the Variable Overview window in Qlikview. With v2.1.1, Qlik has introduced a new variable interface that enlists the existing variables created in the script and also provides the user with the option to create new variables.

Getting ready

For the purpose of this recipe,we will make use of an inline data load which gives the sales information for four countries:

  1. Create a new Qlik Sense application and call it QS_Variables.
  2. Load the following script in the application:
    Sales: LOAD * INLINE [ Country, Sales,COS USA, 1000,500 UK, 2000,1000 France, 3000,2500 Germany, 4000,4700 ]; Let vRedColor=RGB ...

Get Qlik Sense: Advanced Data Visualization for Your Organization now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.