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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors