Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik Community,
I'm currently working with a Qlik Sense script where I need to set a variable to reference the previous day based on the maximum date in my vDateField
. My current script looks like this:
Set vDay = '"~(=Max($(vDateField)))"';
Let vDay = Replace([vDay],'~','$');
However, this script currently sets vDay
to the maximum date in vDateField
. I want to modify it so that vDay
references the day prior to the maximum date instead of the maximum date itself.
Could someone help me with the correct approach to adjust this script so it references the previous day?
Thank you in advance for your assistance!
Check with this:
For previous day based on the maximum date in your vDateField.
Set vDay = '$(=Date(Max($(vDateField)) - 1, 'YYYY-MM-DD'))';
=date($(vDateField)-1)