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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ROBSKI
Frequent Visitor

Need help with running total for FY Budget that fills empty dates with previous dates max

I am trying to build out an expression for my current running totals that will fill in the dates that do not have any values with the last calculated value until a new total is calculated.

 

1. I created a rolling calendaer that goes out 5 years, in this calendar I have a fiscal year column that shows YYYYMM. My Fiscal year starts on Oct 1 and end Sept 30 so a date of 202301 would be fiscal year 2023 and month October. See below

 

ROBSKI_0-1676652893670.png

 

 

 

2. I built out a two running total measures that I used in my pivot table to show the total budget increasing throught the project

 

For the Funding RT

=CALCULATE(

SUM(DC_Funding[Deposit]),

FILTER(ALLSELECTED('calendar'[date]),

ISONORAFTER(calendar[Date],MAX(DC_Funding[Date]),DESC)))

 

For the Obligation RT

=CALCULATE(

SUM(DC_Obligations[Total]),

FILTER(ALLSELECTED('calendar'[date]),

ISONORAFTER(calendar[Date],MAX(DC_Obligations[Ob_Date]),DESC)))

 

But when there are months that have no data these cells are blank or the pivot table does not display them. What I really need is for the RT to dispaly the values from the first data and continue through all dates (I display these monthly) util the final amount is calculated. So if there are months with no values, the table will still display those months but for the value they will so the last value calculated for those months until a new total is calculated. See below screen shot

 

ROBSKI_2-1676653496572.png

 

 

 

The cells that are blank should have the last highest value calculated until the new value is calculated and it should also display the months that are omitted from the table as well. In the example, column A displays the FY and Month, 202201 is Oct 2022, 202202 is Nov 2022 and so on. You can see some months are not displayed like 202204, 202301, 202302, 202303.

 

The following is what I want to achieve

 

ROBSKI_3-1676653769555.png

 

I appreciate any help provided

 

1 REPLY 1
amitchandak
Super User
Super User

@ROBSKI , You can have YTD with Date table

 

example

 

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))

 

 

Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

 

explore Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.