Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Show accumulated value when zooming in line chart

Hello everybody,

I'm trying to find a solution about a problem but I haven't been able so far so I'll ask for your help

I have a line graph with the expression RANGESUM(ABOVE(SUM(Value),0,RowNo())) to get accumulated value over months.

If I zoom in the graph, which is equivalent to select a subset of months, the value of the first selected month is not the accumulated value of the preceding months, but is its punctual value.

For example, if I select month 3 and 4 I would expect 13 and 23, instead I get 4 and 14.

Is there any workaround to solve this problem?

Thanks

1 Solution

Accepted Solutions
sunny_talwar

Try this

RangeSum(Above(Sum({<Month>}Value), 0, RowNo())) * Avg(1)

View solution in original post

7 Replies
sunny_talwar

Try this

RangeSum(Above(Sum({<Month>}Value), 0, RowNo())) * Avg(1)

Clever_Anjos
Employee
Employee

stalwar1‌, guy, you really are a genius

sunny_talwar

I guess I got a chance to learn from one of the best people out there...

Anonymous
Not applicable
Author

Thanks a lot Sunny! Can you explain me the logic behind that or is it too long?

sunny_talwar

Part 1 - Ignore selection in Month field so that your accumulation doesn't restart based on your selection

RangeSum(Above(Sum({<Month>}Value), 0, RowNo()))


Part 2 - Because we ignored selection in Month, I would see all the Months even when I have selected 2 or 3 months. To make the value for the other months to go away, I have to force them to be 0. In order to do that I multiply with Avg(1). Avg(1) will be 1 for months selected and 0 for any month which has not been selected.

Does this make sense?

Anonymous
Not applicable
Author

Totally makes sense. I knew about the first part but didn't know about the second one. Thanks again!

paaerts
Contributor
Contributor

Hey, 

I noticed the same.

However month is concatenation of two tables in my sheet. How can I solve the problem in this case? 

Thank you!