Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to accumulate sales in each line of table?

Hello,

i´ve attached a sample to make it easier to understand my problem.

I´ve got a table in which the first column shows the sales and the second shows the ranking (RowNo()). The table is sort by sales. The third column should show the accumulated sales, like this:

Customers

Sales = sum(Sales)

Raking = RowNo()

Acc. Sales = ??

Customers Sales Ranking Acc. Sales

Customer 1 2500 1 2500

Customer 2 2200 2 4700

Customer 3 1700 3 6400

Customer 4 1300 4 7700

I´ve been playing around with above and below, but i didn't find a solution.

Greets.

1 Solution

Accepted Solutions
Not applicable
Author

On the Expression tab of the chart properties, there is an Accumulation section. I believe you want Full Accumulation. What you'll want to do is make a copy of your Sales Expression and on the second one, set that to Full Accumulation.

Doing it in an Expression is not very pretty.

If(Above(Sales) > 0, Above(Sales) + Sales, Sales)


View solution in original post

2 Replies
Not applicable
Author

On the Expression tab of the chart properties, there is an Accumulation section. I believe you want Full Accumulation. What you'll want to do is make a copy of your Sales Expression and on the second one, set that to Full Accumulation.

Doing it in an Expression is not very pretty.

If(Above(Sales) > 0, Above(Sales) + Sales, Sales)


Not applicable
Author

Sometimes you don´t see thee wood for the trees. Big Smile

Thanks a lot.