Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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])
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.