Excel match and index in Power Query

Hi @Roberto,

To get the Max Value you could use: List.Max( Record.ToList(_))

How does it work?
Record.ToList(_) turns the current row values in a List
List.Max then extracts the maximum value

.

And to get the Name: Record.FieldNames(){List.PositionOf(Record.FieldValues(), [Max Value])}

How does it work?
Record.FieldNames() returns a list of all the column headers
To get a single Name from that List, you can use the position index operator. For example adding {0} would extract the first position in the List. So inside that access operator we lookup the position of that Max Value using this syntax: List.PositionOf(Record.FieldValues(_), [Max Value])

Here is your sample file: eDNA - Excel Index and Match.pbix (20.7 KB)
I hope this is helpful

4 Likes