Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

YTD calculation for trend line

Hello All,

I need to do a YTD count for a trend line on a combo chart. The count basically should be like a summation of the values populated by the bars and this should be done in a YTD format.

For instance, if June has a count of 1, the line chart should reflect that count and should remain consistent until it finds another count. As you can see, in the month of Jan there is another value of 1 present, so the line chart should add this value to the previous value and show 2 for the month of Jan and continue the same calculation going forward.

As it is a YTD count/accumulation, it should refresh the count at the beginning of every new year, so for instance from Jan 2017, it should start from 0 or whatever the value holds for Jan and then accumulate for the rest of the months.

Any suggestions as to how to go about this using set analysis or any other option?

3 Replies
arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Joshua,

There is small setting with your expression:

1. First you need to write your expression as YTD:

  Sum({<Year= {'$(=max(year))'}>}Sale)

2. Then check the check box as shown in image attachedAccumlate.png

Anonymous
Not applicable
Author

But then again, will this help in refreshing the count at the start of a new year ie. Jan 2017 from 0 ?

arvind_patil
Partner - Specialist III
Partner - Specialist III

HI Joshua,

Yes It  will With The help of This Expression:

1. First you need to write your expression as YTD:

  Sum({<Year= {'$(=max(year))'}>}Sale)


Thanks,

Arvind Patil