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! Request now
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
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 93 | |
| 70 | |
| 50 | |
| 40 | |
| 39 |