Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a dashboard that compares Current Year totals vs. Previous Year totals for the current reporting month. The expression for the Current Year is:
Num(Sum({<[FY]={$(vCurrentYear)}>} Cost),'$#,##0.')
We are currently in month two for our reporting calendar. I am having trouble getting just the first two months of data for the Previous Year. I created a field called MonthNumber that pulls the month from a date field. I also have a field called NumberMonth that converts the MonthNumber to a standard month number starting point. For example, our Fiscal Year starts in October, so the first MonthNumber value is 10 then 11 for November and so on. When the value of NumberMonth equals 10, then the value of NumberMonth is 1 and so on.
How can I write the expression for the Previous Year to give me the same month's data as the Current Year? The variable for Previous Year is vPreviousYear.
Cliff, best I have is the following Design Blog post, hopefully it may provide some ideas for you:
https://community.qlik.com/t5/Qlik-Design-Blog/Year-over-Year-Comparisons/ba-p/1462927
Regards,
Brett
Can you please post your expressions for CurrentYear and LastYear.
Below expression should work
vLastYearMonth = Month(Addyears(today(),-1)) - This should give you the same month as that of today for the last year.
Thanks,
Jesh