Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Question on getting previous month values

I have the following data :

PlannedActualMonth
1000800jan 2011
12001100feb 2011
13001400mar 2011
1100900apr 2011
14001600may 2011

I want to display the cumulative % values (cumulative actual / cumulative planned), as in :

jan = 800/1000

feb = (800+1100) / (1000+1200)

mar = (800+1100+1400) / (1000+1200+1300)

and so on...

The table must also consider different years, and the user is able to filter out those months, and data must be displayed like this :


jan 2011feb 2011mar 2011apr 2011may 2011
%80%86%94%91%96%

Any tips ?
I thought of using set analysis in a way that I'd sum jan + feb on feb, then jan + feb + mar on mar, but that doesn't look elegant enough...

1 Reply
Not applicable
Author

The best way is to load cummulative value for each month while loading the data (in load script).  The table will have Planned, Actual, Month, cummulative Planned and Cummulative Actual.   You can initialize this for each year also.

In the result table cummulative value are available for calculation.