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 have the data set below and I'm determining the 'in Spec' column by comparing the Amount to the spec limit in a related column. The column titled 'Column' is trying to return the earliest DT when in Spec column = 1. This is the DAX I'm using:
VesselID | DT | Amount | in Spec | Column |
64007 | 8/13/2024 19:50 | 84 | 0 | 8/13/2024 19:50 |
64007 | 8/14/2024 9:00 | 70 | 0 | 8/13/2024 19:50 |
64007 | 8/14/2024 21:30 | 54 | 0 | 8/13/2024 19:50 |
64007 | 8/15/2024 9:00 | 51 | 0 | 8/13/2024 19:50 |
64007 | 8/15/2024 20:30 | 35 | 1 | 8/13/2024 19:50 |
64007 | 8/19/2024 11:11 | 35 | 1 | 8/13/2024 19:50 |
Solved! Go to Solution.
Your formula is not overly efficient but it returns the desired result
Here is a slightly better alternative with better sample data
@cbruhn42 or try this:
Earliest Date =
CALCULATE (
MIN ( 'Vessel'[DT] ),
ALLEXCEPT ( 'Vessel', Vessel[VesselID] ),
Vessel[in Spec] = 1
)
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@cbruhn42 or try this:
Earliest Date =
CALCULATE (
MIN ( 'Vessel'[DT] ),
ALLEXCEPT ( 'Vessel', Vessel[VesselID] ),
Vessel[in Spec] = 1
)
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Looks like your query plan is better with fewer estimated rows but somehow my version is faster.
Edit: Never mind, I had not disabled the query cache. Same run time, roughly.
Your formula is not overly efficient but it returns the desired result
Here is a slightly better alternative with better sample data
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.