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
Anonymous
Not applicable

Replicate same value in all month where revenue is blank till we have new non blank revenue.

Need to replicate 89.23 in all monthsNeed to replicate 89.23 in all months

Price Index = CALCULATE(Price_Index_Query[Price_Index_Working],DATEADD('Calendar'[Date],-1,MONTH))
 
This is the DAX I am currently using it replicates only for one month needs to replicate till we find a value in invoice revenue.
1 ACCEPTED SOLUTION
DallasBaba
Skilled Sharer
Skilled Sharer

@Anonymous you can do this by creating a calculated column  

 

Revenue_Filled =
VAR _currentDate = MAX('Calendar'[Date])
VAR _lastNonBlankDate =
CALCULATE(
MAX('Calendar'[Date]),
FILTER(
ALL('Calendar'),
'Calendar'[Date] <= _currentDate &&
NOT(ISBLANK(Price_Index_Query[Price_Index_Working]))
)
)
RETURN
CALCULATE(
MAX(Price_Index_Query[Price_Index_Working]),
FILTER(
ALL('Calendar'),
'Calendar'[Date] = _lastNonBlankDate
)
)

 

This formula works by finding the last date that has a non-blank revenue value for each row, and then returning the revenue value for that date. This way, the blanks are filled with the previous non-blank value until a new non-blank value is encountered.


Let me know is this work
@ me in replies or I'll lose your thread!!!

 

Thanks

Thanks
Dallas

View solution in original post

2 REPLIES 2
DallasBaba
Skilled Sharer
Skilled Sharer

@Anonymous you can do this by creating a calculated column  

 

Revenue_Filled =
VAR _currentDate = MAX('Calendar'[Date])
VAR _lastNonBlankDate =
CALCULATE(
MAX('Calendar'[Date]),
FILTER(
ALL('Calendar'),
'Calendar'[Date] <= _currentDate &&
NOT(ISBLANK(Price_Index_Query[Price_Index_Working]))
)
)
RETURN
CALCULATE(
MAX(Price_Index_Query[Price_Index_Working]),
FILTER(
ALL('Calendar'),
'Calendar'[Date] = _lastNonBlankDate
)
)

 

This formula works by finding the last date that has a non-blank revenue value for each row, and then returning the revenue value for that date. This way, the blanks are filled with the previous non-blank value until a new non-blank value is encountered.


Let me know is this work
@ me in replies or I'll lose your thread!!!

 

Thanks

Thanks
Dallas
Anonymous
Not applicable

Thank you very much for the response .it works 

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.