Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
retko1985
Creator II
Creator II

Cummulation with divisions dont give needed numbers.

Hello,

here is an example.

I am, doing accumulation with day dimension. So on first day I have this from expression:  5000 / 5 = 1000. On second day I have this 6000/1 = 6000 .

What I get in chart is this (when I have full accumulation checked and both days selected) - last second day is showing 7000 like this (5000/5)+(6000/1) = 7000

This is not what I want. I want this: (5000+6000) / (5+1) = 11000 / 6 = 1833.33.

Can someone help me here? How can I achieve this?

Thank you.

Here is a QVW with example.

1 Solution

Accepted Solutions
sunny_talwar

Try this

=RangeSum(Above(Sum(Sales), 0, RowNo()))/RangeSum(Above(Sum(Registrations), 0, RowNo()))


Capture.PNG

View solution in original post

4 Replies
sunny_talwar

May be do like this

RangeSum(Above(Numerator, 0, RowNo()))/RangeSum(Above(Denominator, 0, RowNo()))

sunny_talwar

Try this

=RangeSum(Above(Sum(Sales), 0, RowNo()))/RangeSum(Above(Sum(Registrations), 0, RowNo()))


Capture.PNG

retko1985
Creator II
Creator II
Author

Hello,

this work great. Thank you. There is just one visual thing, maybe you can help me with. As I have whole month days on x axes, when I select for example day 15, on X axes I would have bars hor days 15,16,17 and so on. Is this the property of this expression? Because When I select day 15, I would expect only 1 bar for day 15.

Please help. Thank you.

sunny_talwar

You want to see only one bar? It should be doing that today, unless you have set analysis in your expression? May be try this

=RangeSum(Above(Sum({<Day>}Sales), 0, RowNo()))/RangeSum(Above(Sum({<Day>}Registrations), 0, RowNo())) * Avg(1)