Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
teempi
Partner - Creator II
Partner - Creator II

Cumulative sum without charts

Hello,

I'm having a hard time calculating a cumulative sum without using charts (with above()). The case is roughly this:

I have sales data by customer (let's forget the other dimensions for now) which I need to process. I've made a chart that has 3 colums: customerid, customer ranking (based on sum(sales)) and cumulative percentage of sales (meaning that the percentage of the last customer = 100%). The cumulative column uses above() function which is okey in a chart.

Here's an example:

Customer IDSales RankingCumulative Sales %
1310.15
320.29
230.42
740.54
550.65
960.75
1070.85
180.90
690.94
4100.96
15110.98
14120.99
8130.99
11140.99
12151.00

The real question is this: how can I extract a specific customer id based on the cumulative percentage? Let's say I want to have a text box that has the id of the customer that is the first one to have a percentage greater than 0.5 (meaning customer 7). How do I do this?

I've managed to do this with a macro but that's one extra click the user has to make.

Any help is much appreciated!

-Teemu

0 Replies