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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.