4 Replies Latest reply on Jul 18, 2018 8:09 AM by Guillermo Perez

# Cumulative Sum by year with Select Filter

Hello,

I need to make a bar chart such that when you click on one bar  you can see in another box the amount the value has changed from the beginning of that year up to the selected month.

For example, if I click on the bar that is on april 2018 I should have the sum of (changes in january + changes in February + changes in march)

My idea was to do a cumulative sum of the changes each month by year, so when the chart is clicked and it filters to the value selected that cumulative sum is the value needed.

I was trying { FIXED DATETRUNC('year'): SUM([month_changes])} which kind of works but it adds the whole year changes, and not up to the selected month.

To be clear , it is not from the initial date up to the last date,  if we click a month in 2015 it has to sum the changes from the beginning of 2015 until the month selected.

I have attached a workbook, with dummy data that is in the same structure that I have.

Thanks!

I appreciate any help.

• ###### 1. Re: Cumulative Sum by year with Select Filter

Hi

Please find the attachment for the requested solution. Let me know if this works for you.

Also please be kind to mark the question as answered if the solution works. It would help other community members.

Regards

Vishnu

• ###### 2. Re: Cumulative Sum by year with Select Filter

Hi Guillermo,

I used table calculations to achieve the desired result. Hope it works for you

Regards,

Abel

• ###### 3. Re: Cumulative Sum by year with Select Filter

This is almost it. Your method works correctly. I just need  to show  the change to be shown in another table. and when the user clicks on the chart the table shows the value for that month.

• ###### 4. Re: Cumulative Sum by year with Select Filter

This is almost it. Your method works correctly. I just need  to show  the change to be shown in another table. and when the user clicks on the chart the table shows the value for that month.