Using the = sign with variables in Set Analysis
We can make use of variables and calculations in set modifiers. The following recipe explains the syntax for using variables for comparison in sets and how to effectively use the =
sign in the dollar sign expansions.
Getting ready
For the purpose of this recipe, we will be using an inline data load that contains shipment details for each customer. Load the following script in the Qlik Sense Data load editor
. Make sure that the last record in this script has the Month
set to the current month and the DeliveryDate
set to today's date:
Let vToday=Today (); Sales: LOAD DATE(Date#(DeliveryDate,'DD/MM/YYYY')) AS DeliveryDate, DATE(Date#(ShipmentDate,'DD/MM/YYYY')) AS ShipmentDate, Customer,Month,Volume,Sales,Supplier INLINE [ Customer,Month,DeliveryDate,ShipmentDate,Volume,Sales,Supplier ABC,Jan,01/01/2015,29/12/2014,100,10000,DEF ABC,Feb,02/02/2015,25/01/2015,100,10000,DEF ABC,Mar,03/03/2015,02/03/2015,400,12000,DEF ABC,Apr,04/04/2015,24/01/2015,100...