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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
i have a data table with the 3 colums and i hope to get the last one:
| Identification number | travel date | Reservation class | TYPE |
| HAZERTY | 11/01/2019 | BI | 1st class |
| HAZERTY | 15/02/2019 | BI | 1st class |
| TYOPJRV | 12/03/2019 | BI | MIX |
| TYOPJRV | 13/03/2019 | BZ | MIX |
i have every time 2 lines for each Iden. number, for the earlier date of the identification number i have always BI but for the return (the later date of the identification class) i can find BI or BZ. if i have 2 times BI for the same identification number i want to call it 1st class and if i have another value for the return i want to call it mix
i am looking to get the colonne TYPE but i just can't find the way after spending few hours with this.
I tried a :
Solved! Go to Solution.
thank you it work, didn't know before the all except!! 🙂
@Anonymous
Seems you are just missing the earlier function
Column =
CALCULATE (
DISTINCTCOUNT ( 'A_R MALIN'[Reservation class] ),
FILTER (
'A_R MALIN',
'A_R MALIN'[identification number]
= EARLIER ( 'A_R MALIN'[identification number] )
)
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 135 | |
| 102 | |
| 67 | |
| 65 | |
| 56 |