Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
rasmusilestedt
Contributor
Contributor

Set analysis: Previous month?

Hi all!


I am struggling a bit with one thing. I want to find a way to write a set analysis to sum up every month's previous month's sales. My sales data is on a monthly basis and I have managed to set up a flag to capture (IS_Previous_Month) in order to get a snap shot of what was previous month's sales for just this time period right now, so to speak. However, I would like to be able to select in a bar chart for example February 2018 and see Sales of January 2018.

The reason for this is that I am about to develop another KPI later that involves every selected time period's previous month's sales.

How would you recommend to solve this issue?

1 Reply
MK9885
Master II
Master II

In set analysis you can use
Num_Month = {$(=Max(Num_Month)-1)} ,Month
Num_Month is numeric months 1,2,3...12
This would always give you previous month from whatever is selected