March 2018
Beginner to intermediate
514 pages
13h 11m
English
As we have mentioned throughout this chapter, variables can hold strings. The values in the set modifiers can then be placed by the variables.
Say you had the following expression:
sum({$< [Product] = {'Current Account'} >} [Balance])
You can make this expression more flexible and dynamic by replacing the Product value with a variable. Let's create a variable in the script containing the value of the product:
SET vMyProduct = 'Current Account';
To replace the value in the set analysis, replace the value Current Account with the variable name using a dollar-sign expansion. The expression looks as follows:
sum({$< [Product] = {'$(vMyProduct)'} >} [Balance])
Whenever Qlik finds a dollar-sign expansion, it ...
Read now
Unlock full access