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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to find the nth occurence of a value in a list?

Hi,

 

I know how to find the position of a value in a list by using =List.PositionOf(Table1[ColumnName],[value1]). This wil return the position of the value in the list. But how do i find the posisition of the value in the list for the second or third occurence in the list?

 

Thanks in advance!

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

List.PositionOf  can take an optional parameter for the max number of positions to find so put something in there (like 50) and that will return a list of the positions.

You can refer to that list by name with curly brackets with the index of the number inside:

e.g. theList{1}  will return the position of the 2nd occurrence

View solution in original post

1 REPLY 1
HotChilli
Super User
Super User

List.PositionOf  can take an optional parameter for the max number of positions to find so put something in there (like 50) and that will return a list of the positions.

You can refer to that list by name with curly brackets with the index of the number inside:

e.g. theList{1}  will return the position of the 2nd occurrence

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Solution Authors