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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
rachellek
Frequent Visitor

Measure showing latest non-empty value, when later, empty, dates exist

I'm trying to write a measure which shows the most recent non-empty value.

 

My data looks like:

Year Start DateValueTarget
1/1/1926
1/1/2005
1/1/2114
1/1/22 3

 

 

I've tried using
Measure = CALCULATE(sum('Table'[Value]),LASTNONBLANK('Table'[Year Start Date], 1))
 
But it only returns Blank. I would like it to return the 1 from the example. 
 
Is there a way of doing this in DAX?
 
 
 
2 REPLIES 2
Jos_Woolley
Solution Sage
Solution Sage

Hi,

Shouldn't you just be using:

 

MyMeasure =
LASTNONBLANK ( 'Table'[Value], 1 )

 

Regards

Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @rachellek 

 

You can sort the date... as descending and apply Is not blank filter on the value.

Tanushree_Kapse_0-1627890312031.png

 

 

Thanks!

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.