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

Full accumulation - showing a period

Hi guys,

I'm facing a problem in my line chart.

I want to show the accumulated sum of a bank balance, but only for this year.

To do so, I'm using the following script with MonthYear as dimension:

rangesum(above(sum([GL Amount USD]),0,rowno()))

This script is working fine when I'm showing the bank balance as a line chart over all the years in our database.

When I'm selecting to show only the current year, the script above is starting to accumulate with the first month of the current year as starting point.

How could I make a chart where the bank balance is fully accumulated over all the years, but where only the current year is displayed?


Thanks a lot in advance!:)

Cheers,

Mike

1 Solution

Accepted Solutions
sunny_talwar

You are using calculated dimension, why? Try with Date and select Year  = 2017

Capture.PNG

But if you want to look at only 2017, regardless of selection, then try this

RangeSum(Above(Sum({<Year, Date, MonthYear, Month>}[GL Amount USD]), 0, RowNo())) * Avg({<Year = {2017}>}1)

View solution in original post

32 Replies
OmarBenSalem

Maybe=

rangesum(above(sum({<Year={"$(=Year(Today(1)))"}>}[GL Amount USD]),0,rowno()))

Anonymous
Not applicable
Author

Thanks for your reply Omar!

Unfortunately this script does the same as I already had.

It starts to accumulate at january 2017, where the starting point should be in April 2009.

Is there a way to select the starting date for the accumulation, but only show the current year?

Anonymous
Not applicable
Author

Do you experts have an idea for this problem? gwassenaarmtostalwar1

mslottje wrote:

Hi guys,

I'm facing a problem in my line chart.

I want to show the accumulated sum of a bank balance, but only for this year.

To do so, I'm using the following script with MonthYear as dimension:

rangesum(above(sum([GL Amount USD]),0,rowno()))

This script is working fine when I'm showing the bank balance as a line chart over all the years in our database.

When I'm selecting to show only the current year, the script above is starting to accumulate with the first month of the current year as starting point.

How could I make a chart where the bank balance is fully accumulated over all the years, but where only the current year is displayed?


Thanks a lot in advance!:)

Cheers,

Mike

sunny_talwar

Try this

RangeSum(Above(Sum({<Year, Date, MonthYear, Month>}[GL Amount USD]), 0, RowNo())) * Avg(1)

Anonymous
Not applicable
Author

Hi Sunny,

thanks for your help, unfortunately this expression doesn't change the outcome..

Any other ideas?

Or should I create an example file?

Kind regards,

Mike

sunny_talwar

Which field are you making selection in?

Anonymous
Not applicable
Author

I have a line chart with MonthYear as dimension and the expression you gave me as measure.

I've made a selection in the dimension with the following if statement:

if(Year='2017', MonthYear)

sunny_talwar

I think the above expression should work... I think if you can share a sample where you can show it isn't working, we might be able to look to see what is wrong

Anonymous
Not applicable
Author

Hi Sunny,

I'll get back to you later with an example file.

Mike