Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I´m just learning Qlik Sense and cannot find a solution in here for my problem. I
n my data model I have a Snapshotdate where a snapshot of every budget day is included. Now I´m trying to calculate the change between the most current day and the day before. Therefore I tried to create a variable with max function.
For example today is 2022-06-17, that means the last snapshot would be 2022-06-16 and the snapshot before 2022-06-13 because of public holiday.
How can I create two variable which let me calculate the change between these two days?
My try was:
LET vSnapshotDate =max(date#(SnapShotDate,'YYY-MM-DD'),0);
LET vSnapshotDate =max(date#(SnapShotDate,'YYY-MM-DD'),1);
It returns 'Null'
create variables in front end, not the script
https://www.youtube.com/watch?v=ZORSYf45RNU
Name : vMaxSnapshot
Expression
=Date(max(date#(SnapShotDate,'YYY-MM-DD'))) // with the leading equal sign
Name : vPriorSnapshot
Expression
=Date(max(date#(SnapShotDate,'YYY-MM-DD'),2)) // with the leading equal sign
create variables in front end, not the script
https://www.youtube.com/watch?v=ZORSYf45RNU
Name : vMaxSnapshot
Expression
=Date(max(date#(SnapShotDate,'YYY-MM-DD'))) // with the leading equal sign
Name : vPriorSnapshot
Expression
=Date(max(date#(SnapShotDate,'YYY-MM-DD'),2)) // with the leading equal sign