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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Julier
Helper III
Helper III

Running sum

Hello, Im hoping someone can help, How can I get this measure to leave the running total for the rest of the month blank if there is nothing in the ytd corresponding column, at the moment it fills in the rest of the days with what it has calculated so far.

Julier_0-1751534652495.png

 

1 ACCEPTED SOLUTION
MarkLaf
Memorable Member
Memorable Member

I think you can get this by just updating your visual calc like so:

 

Running sum = IF( NOT ISBLANK( [YTD] ), RUNNINGSUM([YTD]) )

 

View solution in original post

8 REPLIES 8
MarkLaf
Memorable Member
Memorable Member

I think you can get this by just updating your visual calc like so:

 

Running sum = IF( NOT ISBLANK( [YTD] ), RUNNINGSUM([YTD]) )

 

This worked like a dream, thank you !

v-sgandrathi
Community Support
Community Support

Hi @Julier,

 

Thank you for providing information on your issue. I’ve reviewed your scenario and successfully replicated it using sample data on my end.

I’m sharing the working .pbix file below so you can explore the setup and DAX logic more clearly. Please feel free to open it and review how the relationships and measures are configured:

 

I hope this helps resolve your issue. If you have any questions or need further clarification, I’m happy to help.

Thanks for being part of the Microsoft Community!

Thank you for your reply unfortunately I need to be able to graph as below and as the data behind it has different sites attched to the sales I also need the graph to change when a slicer is selected, as you can see the chart flatlines at the last running total due to no sales from day 3 forward as yet, I want the current year line to grow as the month goes on 

Julier_0-1751553047761.png

 

Hi @Julier , is this what you eyeing for? For achieving this, the code shall be as follows, thanks

SundarRaj_0-1751618405542.png

Jul25 YTD =
VAR YearToDate =
CALCULATE(
    [Jul25],
    DATESYTD(
        'Calendar'[Date]
    )
)
RETURN
IF(
    [Jul25],
    YearToDate,
    ""
)

 

SundarRaj_1-1751618459612.png

 

 

Sundar Rajagopalan

Hello,  Im not sure I'm explaining myself clearly, the data is in the format below and as I have used the running sum to plot the visual i need for it to not calculate a running sum for he remainder of the current month if there are no sales  in the rest of the month as these will come in each day and then the line with continue to calaucate the running sum as the month goes on without flat lining 

MonthYearDayInMonthVolume (SQM)
Jul 24111212
Jul 24158307
Jul 2512438
Jul 25164838
Jul 25123257
Jul 2513297
Jul 2514976
Jul 25142634
Jun 25222630
Jul 25238497
Jul 24219799
Jun 252332
Jun 25220040
Jun 25213830
Jul 2426576
Jun 2538275
Jun 2535833
Jun 2539159
Jun 2536084
Jun 2537421
Jul-25310980
Jul-25326144
Jul-2532789
Jun 25313031
Jun 25322700
Jun 2539945
Jun 25319630
Jun 24513251
Jun 2556904
Jun 25511494
Jun 2559022
Jun 2555420
Jun 25531514
Jun 25513277
Jun 25510149
Jun 2453802
Jun 2453948
Jun 2457335
Jun 2456082
Jun 2457916
Jun 2453360
Jul 2452243
Jul 24514733
Jul 2455725
Jul 2457459
Jul 2457621
Jul 24618677
Jul 2466060
Jul 24629212
Jul 2468882
Jul 2463469

Hi @Julier,

Thank you for the follow up!

 

After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. I have used the data which you provided and successfully implemented it.  


I am also including .pbix file for your better understanding, please have a look into it:

 

Hope this will help you resolve your issue, if you need any further assistance, feel free to reach out.


Thank you for using Microsoft Community Forum.

Omid_Motamedise
Super User
Super User

Do you want to handle it in Excel, Power Query or Dax?

If my answer helped solve your issue, please consider marking it as the accepted solution. It helps others in the community find answers faster—and keeps the community growing stronger!
You can also check out my YouTube channel for tutorials, tips, and real-world solutions in Power Query with the following link
https://youtube.com/@omidbi?si=96Bo-ZsSwOx0Z36h

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.