Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

month over month sales

  Hi all,

                         I am new to Qlikview,  I want to see the current month and Previous month sales .

StateMonthSalesYear
Apjan1002015
Apfeb2002015
Apmar3002015
Karnatakajan1002015
Karnatakafeb2002015
Karnatakamar3002015

can you please help on these,

regards,

sruthi

3 Replies
Not applicable
Author

sum({<month={$(=Max(month)-1)}>}sales)

goncalo_ricardo_pereira
Partner - Contributor III
Partner - Contributor III

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

Not applicable
Author

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)