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
Clint
Helper V
Helper V

Problem finding just the latest value in a column

I've got a dataset that looks like the below table and I'm trying to write a measure that will return the last ABD value based. I've tried using this dax:
Remaining Scope =
CALCULATE(
SUMX('Burndowns2',[ABD]),FILTER('Burndowns2',LASTNONBLANK('Burndowns2'[ABD],MAXX('Burndowns2',[Week])
))
)
 
ABD.jpg
But this just gives me the sum of all ABD instead of "116" which is the latest value. any insight is appreciated.
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Clint ,

lastnonblankvalue(Table[Date],sum(Table([ABD])))

lastnonblankvalue(Table[Date],Max(Table([ABD])))

 

refer : https://www.linkedin.com/pulse/five-recent-power-bi-functions-you-should-use-more-often-amit-chandak

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

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Clint ,

lastnonblankvalue(Table[Date],sum(Table([ABD])))

lastnonblankvalue(Table[Date],Max(Table([ABD])))

 

refer : https://www.linkedin.com/pulse/five-recent-power-bi-functions-you-should-use-more-often-amit-chandak

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

Thank you Amit.  The first DAX expression did the trick.  I had tried something like that before but didn't add the "date" part of lastnonblankvalue so thank you.

Greg_Deckler
Community Champion
Community Champion

@Clint - Try Lookup Min/Max - https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
mahoneypat
Microsoft Employee
Microsoft Employee

A few ways you can do this.  Here are two.  Both assume you have the ID column in your visual (so additional filtering for that is not needed in these measures).

 

1. Last Value = LASTNONBLANKVALUE(Table[Date], MIN(Table[ABD]))

 

 

2. (Replace Value with ABD and Last with your actual table name)

Last Value =
VAR maxdatewithvalue =
MAXX (
FILTER ( SUMMARIZE ( Last, Last[Date], Last[Value] ), Last[Value] > 0 ),
Last[Date]
)
RETURN
CALCULATE ( MIN ( Last[Value] ), Last[Date] = maxdatewithvalue )

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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