Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
markvandermeij7
Partner - Contributor
Partner - Contributor

Cumulative calculations in crosstable or charts - with selected periods

We have a weekly revenue;

We want to select 1 or more periods.

Both periods need to show correct revenue. This is not working.

We're not looking to use an "as-of" table, as this would complicate selection options.

Please see the screenshot below.
Formula such as below do not work.

sum({ <Year={"=$(=Max(Year))"},SEQ={"<=$(=Max(SEQ))"} ,YearWeek=>}Value )  (Works in textbox!)

AGGR( sum(Total { <Year={"=$(=Max(Year))"},SEQ={"<=$(=Max(SEQ))"} ,YearWeek=>}Value             )  ,YearWeek )

 

 

casefile.png

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

Try this

RangeSum(Above(Sum({<Year = {"$(=Max(Year))"}, SEQ = {"<=$(=Max(SEQ))"}, YearWeek>} Value), 0, RowNo()))

*

Avg({<Year = {"$(=Max(Year))"}, SEQ = {"<=$(=Max(SEQ))"}>} 1)

 image.png

View solution in original post

2 Replies
sunny_talwar

Try this

RangeSum(Above(Sum({<Year = {"$(=Max(Year))"}, SEQ = {"<=$(=Max(SEQ))"}, YearWeek>} Value), 0, RowNo()))

*

Avg({<Year = {"$(=Max(Year))"}, SEQ = {"<=$(=Max(SEQ))"}>} 1)

 image.png

markvandermeij7
Partner - Contributor
Partner - Contributor
Author

Thanks! That most certainly fixes it for me!