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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

Cumulative Sum

Hello I'm working on a QlikSense dashboard
I'm trying to calculate the cumulative sum by Customer, and Invoice using the following expression:
=RangeSum(

Above(total Sum({<[Data Load],Category,Invoice,Customer>}[Quantity])*
Avg(1),0,aggr(RowNo(),Customer, Invoice))
)

I'm getting the desired result if there is no selection on Invoice, Date, and Category
what I'm trying to accomplish is as follows:
for the invoice that is 12301 the cumulative sum is 3272035 which is correct but when I select the invoice I get 3264618 which is the value of the invoice and not the cumulative sum
I added below the sample data script

ali_hijazi_0-1656589160129.png

 

 

 

Table:
LOAD * INLINE [
Data Load, Quantity, Category, Customer,Invoice
31/10/2018, 7417, apple,C1,12300
31/10/2018, 3264618, orange,C1,12301
31/10/2018, 7487132, pear,C2,45600
30/11/2018, 79892, apple,C1,12302
30/11/2018, 3329629, orange,C1,12303
30/11/2018, 7318647, pear,C2,45601
31/12/2018, 85071, apple,C1,12304
31/12/2018, 3382092, orange,C1,12305
31/12/2018, 7162199, pear,C2,45602
31/01/2019, 91648, apple,C1,12306
31/01/2019, 2515989, orange,C1,12307
31/01/2019, 7923292, pear,C2,45603
28/02/2019, 95574, apple,C1,12308
28/02/2019, 3459038, orange,C1,12309
28/02/2019, 6862316, pear,C2,45604
31/03/2019, 99109, apple,C1,12310
31/03/2019, 3499973, orange,C1,12311
31/03/2019, 6753454, pear,C2,45605
];

 

I can walk on water when it freezes
Labels (1)
0 Replies