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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
robs_au
New Member

RUNNINGSUM Visual Calculation - stop after last value

I've been trying out the new RUNNINGSUM() Visual Calculation and it comes so agonisingly close to what I need.

I'm comparing progress of an event against the previous two years.  The problem I get is that because one of my columns is this year, it's a year in progress.  So until the current point of the year, I have three lines tracking against each other and it's exactly what I need.  When it reaches the current point of the year, the 2024 line suddenly becomes a horizontal line streaking out across the visual.

 

Running Points = RUNNINGSUM([Sum of Points])

 

RUNNINGSUM out of the boxRUNNINGSUM out of the box

 

This looks terrible of course.  In testing out a theory, I found I could get what I needed by hardcoding a stop point.

 

Running Points = IF([Year]<>"2024 Event",RUNNINGSUM([Sum of Points]),IF([DaysFromEvent]<-52,RUNNINGSUM([Sum of Points])))

 

Stopping the RUNNINGSUM at the last datapoint.Stopping the RUNNINGSUM at the last datapoint.

I'm a relative newbie - now I've seen I can theoretically get the visual I need, what I'm wanting to do is remove the hardcoded -52 in my formula and instead have the formula look at the "2024 Event" column, see the last datapoint of Points, and read the "Days of Event" value for that row.  It's all in the table the visual calculation is using, I just can't seem to figure out how to get this value.

 

Of course in a perfect world RUNNINGSUM would just behave this way out of the box once it encounters blanks all the way down, or have a user option to direct apropriate behaviour - I cannot be unique in having this usecase of comparing an in-progress column against complete columns.  Then I wouldn't have to hardcode the year either.

 

Anyone got thoughts on if what I'm trying to do is even possible, or if I've made a horrible mess of something simple?

1 ACCEPTED SOLUTION
robs_au
New Member

I'm going to reply to my own post... actually having to write out and explain the issue I was having got the cogwheels turning some more and I figured it out.  I could delete my post but in the interest of potentially saving someone else finding themselves in the same confusion I was in, this was the solution:

Running Points = IF(ISBLANK([Sum of Points]),BLANK(),RUNNINGSUM([Sum of Points]))

 

Not that elegant, but it does the job.

View solution in original post

1 REPLY 1
robs_au
New Member

I'm going to reply to my own post... actually having to write out and explain the issue I was having got the cogwheels turning some more and I figured it out.  I could delete my post but in the interest of potentially saving someone else finding themselves in the same confusion I was in, this was the solution:

Running Points = IF(ISBLANK([Sum of Points]),BLANK(),RUNNINGSUM([Sum of Points]))

 

Not that elegant, but it does the job.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.