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: 
ali_hijazi
Partner - Master II
Partner - Master II

Cumulative sum that resets after each value of customer

Hello

I'm working on QlikView 12

I have a pivot table as follows:

when I'm displaying more than one customer then the cumulative sum continues I want to start for example here for the second customer with -1,789.45 instead of 1902.67 which comes from 3,692.12 of the first customer added to -1,789.45

the expression for the open amount is

sum({<accounting_document_status={'open'}>}accounting_open_amount)

the expression for the cumulative amount is:

[Open Amt] + RangeSum(Above(Total [Open Amt],1,RowNo(TOTAL)))

it works fine when there is only one customer displayed

Untitled.png

I can walk on water when it freezes
7 Replies
sunny_talwar

May be remove the 2 TOTALS from the expression

[Open Amt] + RangeSum(Above([Open Amt],1,RowNo()))

sunny_talwar

Actually this might not work because you have many dimensions in your chart.... you might need an Aggr() function... but it might be easier if you can share a sample and we can try it out

ali_hijazi
Partner - Master II
Partner - Master II
Author

check attached sample document please

I can walk on water when it freezes
sunny_talwar

If you have qv 12, you can try this

Sum(Aggr(RangeSum(Above(Sum({<accounting_document_status={'open'}>}accounting_open_amount), 0, RowNo())), customer_name, (document_number, (numeric))))


Capture.PNG

antoniotiman
Master III
Master III

Hi,

Try

RangeSum(Top([Open Amt],1,RowNo()))

Regards,

Antonio

ali_hijazi
Partner - Master II
Partner - Master II
Author

it didn't work for the rest of the customers

Please check my new post titled Help in Sortable Aggr

I can walk on water when it freezes