Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I want to write a measure to return the most current value for an asset based on the last date available:
| Table1 | ||
| Asset ID | Value | Period | 
| A | 1500 | 1-Dec-20 | 
| A | 4500 | 1-Mar-21 | 
| A | 2000 | 1-Jun-21 | 
| B | 500 | 1-Dec-20 | 
| B | 150 | 1-Mar-21 | 
| B | 100 | 1-Jun-21 | 
| C | 600 | 1-Dec-20 | 
| C | 1000 | 1-Mar-21 | 
| C | 900 | 1-Jun-21 | 
| Result | ||
| Asset Id | Current Value | Period | 
| A | 2000 | 1-Jun-21 | 
| B | 100 | 1-Jun-21 | 
| C | 900 | 1-Jun-21 | 
Solved! Go to Solution.
@shelleye This is Lookup Min/Max, like this:
Measure Lookup Max Simple =  
    VAR __Table = 'Table1'
    VAR __Max = MAXX(__Table,[Period])
RETURN
    MAXX(FILTER(__Table,[Period] = __Max),[Value])
@shelleye No problem, I actually grabbed that from my test PBIX for my external tool, Microsoft Hates Greg's Quick Measures. I have 4 different lookup min/max formulas in there that make these kinds of calculations a breeze.
@shelleye This is Lookup Min/Max, like this:
Measure Lookup Max Simple =  
    VAR __Table = 'Table1'
    VAR __Max = MAXX(__Table,[Period])
RETURN
    MAXX(FILTER(__Table,[Period] = __Max),[Value])
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.