Skip to main content
Applications are open for the 2024 Qlik Luminary Program. Apply by December 15 here.
Showing results for 
Search instead for 
Did you mean: 

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
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