Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

SPRibeiro
New Contributor II

Accumulated chart

Hi,

I have some difficulties for calculating the accumulated sum.  I have a line chart where I calculates the sum of the values since the beginning of the year.

I use the function RangeSum() and Above() and the line of values when I don't have any year selected is correct.

My issue is when I select one year, the values doesn't accumulate.

Any ideia to resolve that?

Best Regards


Tags (1)
1 Solution

Accepted Solutions

Re: Accumulated chart

Can you make sure that you have checked 'Suppress Zero Values' on the presentation tab of the chart properties?

15 Replies

Re: Accumulated chart

Assuming this is your expression

RangeSum(Above(Sum(Measure), 0, RowNo()))

try to change it to this

RangeSum(Above(Sum({<Year>}Measure), 0, RowNo())) * Avg(1)

sergio0592
Valued Contributor II

Re: Accumulated chart

Sunny can you explain why you use * Avg(1)?


Thanks

Re: Accumulated chart

Year in the main expression will ignore selection in Year field... which would means that if the user selected 2014, they will continue to see all the years. In order to see the accumulated value only for 2014, Avg(1) is used. Avg(1) will equal 1 for selected year and 0 otherwise

sergio0592
Valued Contributor II

Re: Accumulated chart

Ok, i understand. Foxy trick! Thanks.

SPRibeiro
New Contributor II

Re: Accumulated chart

It worked for the values, but when I select the year, the x-axis dimension year does not fit, show me every year. As for the row, the selected year appears and the remaining area is empty for the other years.

Re: Accumulated chart

Would you be able to share an image of what you are seeing?

SPRibeiro
New Contributor II

Re: Accumulated chart

I have the expression

RangeSum(Above(Sum({<YearMonth} Measure1),0,RowNo()))

/ RangeSum(Above(Sum({<YearMonth} Measure2),0,RowNo()))*avg(1) and values doesn't acummulated.

If i have

RangeSum(Above(Sum({1<YearMonth} Measure),0,RowNo()))

/RangeSum(Above(Sum({1<YearMonth} Measure),0,RowNo()))*avg(1) the values are correct and the line too, for the year selected, but the graph show me every years.

Re: Accumulated chart

Sample or an image?

SPRibeiro
New Contributor II

Re: Accumulated chart

Image. Basically, i select Year 2018 and the dimension Year of the graph show me every years, but in the graph where i have year 2017 i don't have line