Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
orangebloss
Creator
Creator

Cumulative total in a pivot table does not carry over

I need a cumulative count of the following data:

 

Reason/Yearweek 2024/01 2024/02 2024/03 2024/04 2024/05
ABC 1 5   2 1
DEF   1 3   2
GHI 1     2  

 

at the moment I've created a field called 'Count' populated with '1' in the data load and attempted a range sum

Rangesum(Before(Sum(Count),0,ColumnNo()))

which produces the following

Reason/Yearweek 2024/01 2024/02 2024/03 2024/04 2024/05
ABC 1 6 - 8 9
DEF   1 4 -

6

GHI 1 - - 3 -

 

I want it to show like this : 

 

Reason/Yearweek 2024/01 2024/02 2024/03 2024/04 2024/05
ABC 1 6 6 8 9
DEF   1 4 4

6

GHI 1 1 1 3 3

 

Is there a way to do this - either with the formula I have or an alternative approach?

Labels (3)
4 Replies
hic
Former Employee
Former Employee

Try

Rangesum(Before(Sum(Count)+Sum({1} 0),0,ColumnNo()))

orangebloss
Creator
Creator
Author

Thanks for that - I tried it but it just returned 0 for everything?

hic
Former Employee
Former Employee

Strange... That should work if you have the field "Yearweek" in a master calendar with all weeks defined.

orangebloss
Creator
Creator
Author

Ah Yearweek is a field not a master calendar 😞