Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Just wanted to share something I created recently for a project in QlikView 11. I need to store in Variables the current Year and Month. For comparison purposes I decided to also store the previous year too. First create the following Variables:
1. "vYear_Current"
2. "vYear_Previous"
3. "vMonth_Current"
Then add the following to your Load Script
LET vYear_Current = Year(Today());
LET vYear_Previous = Year(Today()) -1;
LET vMonth_Current = Month(Today());
Once you refresh the QVW those variables will populate with the current year, current month and previous year values based on the date of the local computer or server.
Hi Joshua,
I think you should rename vMonth_Current into vMonth_Previous
Cheers,
Antoine