Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
domdom
Helper II
Helper II

Identifying first occurance of text value in a column

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 idposition idstart date
EP2617/12/2017
EP4804/11/2017
EP4118/10/2017
EP3717/10/2017
EP21429/09/2017
EP1204/08/2017
EP41304/05/2017
EP4526/04/2017
EP11017/04/2017
EP5413/04/2017
EP2911/04/2017
EP1304/04/2017
EP41104/04/2017
EP21230/03/2017

 

and so the calculated column should show as below:

 

worker idposition idstart dateFirst Occurance of Worker id?
EP2617/12/2017TRUE
EP4804/11/2017TRUE
EP4118/10/2017FALSE
EP3717/10/2017TRUE
EP21429/09/2017FALSE
EP1204/08/2017TRUE
EP41304/05/2017FALSE
EP4526/04/2017FALSE
EP11017/04/2017FALSE
EP5413/04/2017TRUE
EP2911/04/2017FALSE
EP1304/04/2017FALSE
EP41104/04/2017FALSE
EP21230/03/2017FALSE

 

Many thanks for any help you can give

 

 

 

Thanks

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@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
Helper II
Helper II

you can ignore the position id and the start date

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors