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
Hi there,
I need a way of identifying the first occurance of a text value in a table. E.g. in this instance the alphanumeric field "worker id"
from the following table:
| worker id | position id | start date |
| EP2 | 6 | 17/12/2017 |
| EP4 | 8 | 04/11/2017 |
| EP4 | 1 | 18/10/2017 |
| EP3 | 7 | 17/10/2017 |
| EP2 | 14 | 29/09/2017 |
| EP1 | 2 | 04/08/2017 |
| EP4 | 13 | 04/05/2017 |
| EP4 | 5 | 26/04/2017 |
| EP1 | 10 | 17/04/2017 |
| EP5 | 4 | 13/04/2017 |
| EP2 | 9 | 11/04/2017 |
| EP1 | 3 | 04/04/2017 |
| EP4 | 11 | 04/04/2017 |
| EP2 | 12 | 30/03/2017 |
and so the calculated column should show as below:
| worker id | position id | start date | First Occurance of Worker id? |
| EP2 | 6 | 17/12/2017 | TRUE |
| EP4 | 8 | 04/11/2017 | TRUE |
| EP4 | 1 | 18/10/2017 | FALSE |
| EP3 | 7 | 17/10/2017 | TRUE |
| EP2 | 14 | 29/09/2017 | FALSE |
| EP1 | 2 | 04/08/2017 | TRUE |
| EP4 | 13 | 04/05/2017 | FALSE |
| EP4 | 5 | 26/04/2017 | FALSE |
| EP1 | 10 | 17/04/2017 | FALSE |
| EP5 | 4 | 13/04/2017 | TRUE |
| EP2 | 9 | 11/04/2017 | FALSE |
| EP1 | 3 | 04/04/2017 | FALSE |
| EP4 | 11 | 04/04/2017 | FALSE |
| EP2 | 12 | 30/03/2017 | FALSE |
Many thanks for any help you can give
Thanks
Solved! Go to Solution.
@domdom,
Based on your sample data, you can create the following columns in your table.
Rank = RANKX(FILTER(Table,Table[worker id]=EARLIER(Table[worker id])),Table[start date],,DESC)
First Occurance of Worker id? = IF(Table[Rank]=1,TRUE(),FALSE())
Regards,
Lydia
@domdom,
Based on your sample data, you can create the following columns in your table.
Rank = RANKX(FILTER(Table,Table[worker id]=EARLIER(Table[worker id])),Table[start date],,DESC)
First Occurance of Worker id? = IF(Table[Rank]=1,TRUE(),FALSE())
Regards,
Lydia
you can ignore the position id and the start date
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 |
|---|---|
| 97 | |
| 73 | |
| 50 | |
| 46 | |
| 44 |