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
Can you make sure that you have checked 'Suppress Zero Values' on the presentation tab of the chart properties?
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)
Sunny can you explain why you use * Avg(1)?
Thanks
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
Ok, i understand. Foxy trick! Thanks.
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.
Would you be able to share an image of what you are seeing?
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.
Sample or an image?
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