The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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 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.
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?
Solved! Go to Solution.
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.
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.
User | Count |
---|---|
14 | |
12 | |
8 | |
6 | |
5 |
User | Count |
---|---|
28 | |
19 | |
13 | |
7 | |
5 |