Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi All
Thank you for your help in advance first.
I have below Table.
HB is not an unquie number
Master is unquie number
I want to show the row of data with earliest COB
i am not sure how can i do that, not sure if anyone could help me?
Raw Data:
| HB | Master | COB | Origin |
| 4411255 | ABC12345 | 12-Aug | MAD |
| 4411255 | CDE54321 | 15-Aug | HKG |
| 556677 | ABD12345 | 12-Aug | MAD |
| 337788 | UIZ56789 | 11-Aug | LHR |
| 667788 | KIL12345 | 11-Aug | WAW |
| 667788 | POI55667 | 12-Aug | FRA |
| 667788 | UYE99778 | 13-Aug | CDG |
Ideal Result
| HB | Origin |
| 4411255 | MAD |
| 556677 | MAD |
| 337788 | LHR |
| 667788 | WAW |
Thank you!
Solved! Go to Solution.
@Ericwhv , I have blog for latest value, You can try the same with min for min value
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0
Last Status = var _max = minx(filter(ALLSELECTED(Data), Data[HB] = Max(Data[HB])), Data[COD])
return
CALCULATE(max(Data[Origin]), filter((Data) , Data[Date] =_max))
@Ericwhv , I have blog for latest value, You can try the same with min for min value
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0
Last Status = var _max = minx(filter(ALLSELECTED(Data), Data[HB] = Max(Data[HB])), Data[COD])
return
CALCULATE(max(Data[Origin]), filter((Data) , Data[Date] =_max))
Hi Amit
sorry for asking again, if i would like to add one more criteria, is it possible?
shall we check if leg check column has a "Last leg" or not?
if there is a "Last Leg", then show that HB
if there are empty or no "Last Leg" exist, then keep the same logic before.
thank you.
Raw Data:
| HB | Master | COB | Origin | Leg Check |
| 4411255 | ABC12345 | MAD | Last Leg | |
| 4411255 | CDE54321 | 15-Aug | HKG | First Leg |
| 556677 | ABD12345 | 12-Aug | MAD | |
| 337788 | UIZ56789 | 11-Aug | LHR | |
| 667788 | KIL12345 | 11-Aug | WAW | Last Leg |
| 667788 | POI55667 | 12-Aug | FRA | |
| 667788 | UYE99778 | 13-Aug | CDG |
Ideal Result
| HB | Origin | |
| 4411255 | MAD | Last Leg |
| 556677 | MAD | |
| 337788 | LHR | |
| 667788 | WAW |
Thank you Amit!
you help me again!
it is work and the porblem sorted.
but could you mind to go through with me why that is work?
I want to know how to fishing instead of keep asking fish from you lol
Thank you so much!!
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 21 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 51 | |
| 40 | |
| 30 | |
| 24 |