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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply

Running total with blank dates

I am trying to create a running total Line chart visual for the last 3 years , I have an incident table with a date column (blanks are possible if no incidents that month) connected to a calendar table via date column on a one to many relationship. 

my requriments are to create a running total per month and to return the previous months total if there is blanks. however I am struggling having the line stop at the max incident month available in the data set or accounting for the blank by returning the previous month leaving a break in my line chart visual 


Snag_373f4f.png

Snag_3750e3.png

  

Snag_3763fe.png

Snag_377b8d.png


any help would be gladly appreciated!

2 REPLIES 2
Anonymous
Not applicable

Hi @yazenbarakat123 ,

I create a table as you mentioned.

vyilongmsft_0-1719540059804.png

Then I create a measure as you mentioned.

Measure = 
VAR _currentdate =
    MAX ( 'Table'[Date] )
RETURN
    CALCULATE (
        SUM ( 'Table'[Stock Value] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] <= _currentdate )
    )

vyilongmsft_1-1719540239318.png

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Snag_4161bb.png


Hmm  I seem to be running into the same issue where the line cuts off the blank month 
The Incidents Table does not have any incidents for the month of may so I connect it to a calendar table 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.