Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to create curve of accumulated data A divided by acc data B ?

Hello,

I try to realize a graph with 3 curves:
- Accumulated curve (data A)
- Accumulated curve (data B)
- Curve representing the division of the accumulation of the data A by the accumulation of the data B

I manage well to make 2 first ones (with option "total accumulation" checked in the properties of the graph) but not the 3rd...

I think it exists a formula for that, but my tests are not really decisive for the moment...

Thank you in advance for any help on this subject!

Vincent

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

Skip the option "Accumulation" and do it in the formula instead.


First, add expressions for the accumulated A and B:
RangeSum(A, above(A_accumulated))
RangeSum(B, above(B_accumulated))
Label these expressions "A_accumulated" and "B_accumulated".


I assume there is only one value per bin. If there are several values per bin, you need to use Sum(A) instead of A as first parameter in RangeSum.


Finally, add an expression A_accumlated/B_accumlated.

View solution in original post

3 Replies
hic
Former Employee
Former Employee

Skip the option "Accumulation" and do it in the formula instead.


First, add expressions for the accumulated A and B:
RangeSum(A, above(A_accumulated))
RangeSum(B, above(B_accumulated))
Label these expressions "A_accumulated" and "B_accumulated".


I assume there is only one value per bin. If there are several values per bin, you need to use Sum(A) instead of A as first parameter in RangeSum.


Finally, add an expression A_accumlated/B_accumlated.

swuehl
MVP
MVP

Try to calculate the accumulated curves (instead of the chart properties option) like

=rangesum(above([data A],0, rowno() ))

=rangesum(above([data B],0, rowno() ))

[for the first parameter to above, use your current expressions]

Then you could just use

=column(1) / column(2)

as division of both accumulated values.

Hope this helps,

Stefan

Not applicable
Author

thanks for your answers, both are ok !