Managing variables in the script and layout
Qlik Sense provides the option to define variables in the script and in the user interface.
The variable editor interface enlists the existing variables created in the script, and provides the user with the option to create new variables as well.
Getting ready
For the purpose of this recipe, we will make use of an inline data load that gives the sales information for four countries:
- Create a new Qlik Sense application, and call it
QS_Variables
. - 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 vTemporary = 'Sum(Sales)'; Let vRedColor=RGB (255, 0, 0); Let fSales= vTemporary; Let vTemporary = null();
How to do it…
- Open the
QS_Variables
application. - Create a new sheet called
Sales
, and go to the Edit sheet mode for the sheet. - While in Edit sheet mode, notice that we have a new icon, , in the lower-left corner. Click on the icon to open...