Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to add prior month to get weighted average

Hi All,

I have a chart that displays the following:

Line - Total Project Closed in a given month

Bar - % of those projects closed beyond the original due date

Now the issue that I am having is that they want to see this an a cumulative chart.  So for instance in January we closed out 15 projects and 11 of them were past the original date so we have a percentage of 58% that are late.  Now in February they closed out another 13 projects and 5 were late so that month has a 38% rate.  They want to see Jan +Feb in the Feb chart so they would infact have 32 projects closed and 16 late for a percentage of 50% late.

I am struggling here.....Any help would be much appreciated.

Here is some of my data for an example

The "CompOrig" is essentially the actual completion date of the project - the due date and I count the project if that calculation is greater than 0.  To get my percentage I take that field / total closed...

Month =(Count(If(CompOrig > 0, Title))) =Count(Title)
96 174
Jan1119
Feb513
Mar917
Apr911
May1725
Jun917
Jul1319
Aug217
Sep514
Oct1116
Nov45
Dec11
1 Reply
effinty2112
Master
Master

Try this:

This is a straight table using expressions to work out accumulations rather than selecting accumulation in the table properties.

Accumulated Late =RangeSum(Above(Late,0,RowNo()))

Accumulated Closed=RangeSum(Above(Late,0,RowNo()))

Ratio is Accumulated Late/Accumulated Closed

Month Late Closed =RangeSum(Above(Late,0,RowNo())) =RangeSum(Above(Closed,0,RowNo())) =RangeSum(Above(Late,0,RowNo()))/RangeSum(Above(Closed,0,RowNo()))
Jan1119111957.89%
Feb513163250.00%
Mar917254951.02%
Apr911346056.67%
May1725518560.00%
Jun9176010258.82%
Jul13197312160.33%
Aug2177513854.35%
Sep5148015252.63%
Oct11169116854.17%
Nov459517354.91%
Dec119617455.17%