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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

cumulative sum by customer

Hello got the following pivot table with dimensions(Customer, Customer Rout, Invoice, Invoice date, and invoice due date

cumulative.png

I want to calculate the cumulative sum of invoices by customer

I tried the following expression:

$(vOpenInvoice_NetAmt) + RangeSum(Above(TOTAL $(vOpenInvoice_NetAmt),1,RowNo(TOTAL)))

yet this works fine only if I select one customer with multiple customers the amount is accumulation is full

is there another approach or I should replace rowno(total) with something else? as RowNo(Total) ignores all dimensions

I can walk on water when it freezes
16 Replies
sunny_talwar

Your chart is still sorted by this?

Only({1<TrxType={'sales','sales returns'}, DocStatus={'O'},TrxDate=,DAY=,MONTH=,MONTH_NUM=,MONTH_YEAR=,YEAR=,QUARTER=,CusName=$::CusName,CustomerCode=$::CustomerCode,TrxDefaultSaleman1=$::TrxDefaultSaleman1,TrxDefaultSaleman2=$::TrxDefaultSaleman2,TrxDefaultSaleman3=$::TrxDefaultSaleman3>}DocDueDate)

ali_hijazi
Partner - Master II
Partner - Master II
Author

yes

I can walk on water when it freezes
sunny_talwar

It would be difficult to know without looking at this...

ali_hijazi
Partner - Master II
Partner - Master II
Author

well I managed to make it work but the response on the report is extremely slow

please advise

I can walk on water when it freezes
sunny_talwar

How did you do it? Without knowing what you did, I won't be able to offer any advice

ali_hijazi
Partner - Master II
Partner - Master II
Author

ok I will share with you a reduced document just give me around 5 minutes

I can walk on water when it freezes
ali_hijazi
Partner - Master II
Partner - Master II
Author

please check updated docuemnt attached

for this customer the Cum Amt is taking about 2.5 minutes

and I just noticed that for this particular customer the formula is not giving correct results

I can walk on water when it freezes