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: 
Franco2
Contributor II
Contributor II

Cumulative sum with partition

Hi!

I have a dataset that looks like this:

IdSale Month Seller Cost
1 1 A 10
2 1 B 12
3 1 C 8
4 2 A 7
5 2 B 4
6 2 C 6
7 3 A 9
8 3 B 14
9 3 C 13
10 4 A 15
11 4 B 16
12 4 C 11

 

Each observation is a puntual sale made any day. What I wanted first is a table or graph that can show me the amount sold per seller, which looks like this:

Month A B C
1 10 12 8
2 7 4 6
3 9 14 13
4 15 16 11

 

What I want now is a cumulative sum that shows the amount sold in the previous month and the actual month. That one should look like this:

Month A B C
1 10 12 8
2 17 16 14
3 26 30 27
4 41 46 38

 

I thing the correct way to do it is by putting both month and seller as dimensions and 

RangeSum(Above(cost)) as measure but it doesn't work. When putting only month as dimension it works but when I want to see it divided by seller it doesn't.

Thanks in advance...

 

1 Reply
anat
Master
Master

RangeSum(Above(sum(cost)))