Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
kennethand
Contributor III
Contributor III

Reversed aggregation in Qlik Sense in line graph

I like to make a line graph with 'reversed aggregation'. 

Let's say you ask people how much they are willing to pay for a product

 

I have a data file like this:

Udklip.JPG

Now I need an expression to give me this line graph:

Udklip.JPG

The graph shows me that at the amount of 20 (or more) all 15 people are willing to pay for the product.

But at the price of 25 (or more) only 11 will pay the price.

And only 6 will pay at the price of 30 (or more).

Any suggestions?

 

1 Solution

Accepted Solutions
sunny_talwar

Try this

Count(TOTAL DISTINCT ID) - RangeSum(Above(Count(DISTINCT ID), 1, RowNo()))

or this

 

Count(TOTAL DISTINCT ID) - Aggr(RangeSum(Above(Count(DISTINCT ID), 1, RowNo())), (Amount, (NUMERIC)))

 

View solution in original post

1 Reply
sunny_talwar

Try this

Count(TOTAL DISTINCT ID) - RangeSum(Above(Count(DISTINCT ID), 1, RowNo()))

or this

 

Count(TOTAL DISTINCT ID) - Aggr(RangeSum(Above(Count(DISTINCT ID), 1, RowNo())), (Amount, (NUMERIC)))