Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Cumulative YTD of the Highest Year Selected

So I want to show a cumulative total from month to month for the highest year selected and defaulting to the highest year when no year is selected. I have been able to make a non cumulative line with the code (month by month):

SUM({$< Year={$(=Max(Year))} >}[Customer Incidents])


but am struggling to make a cumulative version (Cumulative YTD).

This is what I have for it now: RANGESUM(ABOVE(TOTAL Sum([Customer Incidents]),0, ROWNO(TOTAL))). Unfortunately it compounds years instead of defaulting to the highest selected. Any help would be appreciated. Thanks!

1 Solution

Accepted Solutions
sunny_talwar

Try this

RangeSum(Above(TOTAL Sum({$<Year = {$(=Max(Year))}>} [Customer Incidents]), 0, RowNo(TOTAL)))

View solution in original post

3 Replies
sunny_talwar

Try this

RangeSum(Above(TOTAL Sum({$<Year = {$(=Max(Year))}>} [Customer Incidents]), 0, RowNo(TOTAL)))

sunny_talwar

Or this

RangeSum(Above(Sum({$<Year = {$(=Max(Year))}>} [Customer Incidents]), 0, RowNo()))

Anonymous
Not applicable
Author

This worked. Thanks so much.