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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Kev_Tord1
Frequent Visitor

Measure: Return the most recent value that is not blank.

Hi everyone,

I was wondering if someone could help me creating a measure for the following scenario.

Purpose: Capturing the most recent "Work ratio" that is not blank. Both "Effective Date" and "Work Ratio" are in the same table "Employment".

 

I have played with a few formulas but it doesn't seem to return the expected value.

 

In this case, I would expect the measure to return 0.60

Thanks for any help,

Kev_Tord1_1-1699639712204.png

 

 

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Here's my approach.  Create a Calendar Table with a relationship (Many to One and Single) from the Effective date column to the Date column.  In the Calendar Table, write calculated column formulas for Year, Month name and Month number.  Sort the Month name column by the Month number column.  To your visual, drag Year and Month fro the Calendar Table.  Write this measure

Measure = calculate([Work ratio],lastnonblank(Calendar[date],calculate([Work ratio])))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ahmedx
Super User
Super User

pls try

Screenshot_6.png

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors