Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am new to Qlikview, I want to see the current month and Previous month sales .
State | Month | Sales | Year |
Ap | jan | 100 | 2015 |
Ap | feb | 200 | 2015 |
Ap | mar | 300 | 2015 |
Karnataka | jan | 100 | 2015 |
Karnataka | feb | 200 | 2015 |
Karnataka | mar | 300 | 2015 |
can you please help on these,
regards,
sruthi
sum({<month={$(=Max(month)-1)}>}sales)
Hello,
You can use something like this:
Current Month:
sum({<Year={'$(=Max(Year))'}, Month={'$(=Max(Month))'}>} sales)
Previous Month:
sum({<Year={'$(=Max(Year))'}, Month={'$(=Month(AddMonths(Max(Month),-1)))'}>} sales)
Best Regards.
Gonçalo Pereira
Hi
Easiest is to create a unique Month ID in the script like the one mentioned here
The Magic of Set Analysis – Point In Time Reporting | iQlik - Everything QlikView.
then set expression for last months sale can be simplified to just
Sum({$<MonthID = {$(=Max(MonthID) – 1)}, Year = , Quarter = , Month = >} Sales)