15 Replies Latest reply: Jun 29, 2018 8:12 AM by Sunny Talwar

# 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

• ###### Re: Accumulated chart

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

try to change it to this

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

• ###### 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

• ###### 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?

• ###### 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?

• ###### 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

• ###### Re: Accumulated chart

Where is the image?

• ###### Re: Accumulated chart

I have one year selected

• ###### Re: Accumulated chart

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

• ###### Re: Accumulated chart

HI ,

I have attached a document using cumulative sum,I hope it helps.