Table.PositionOfAny
Returns the position or positions of any of the specified rows within the table.
function (table
as table,rows
as list, optionaloccurrence
as nullable any, optionalequationCriteria
as nullable any) as nullable any
Returns the row(s) position(s) from the
table
of the first occurrence of the list of rows
. Returns -1 if no occurrence is found. Table.Membership
Find the position of the first occurrence of [a = 2, b = 4] or [a = 6, b = 8] in the table
({[a = 2, b = 4], [a = 6, b = 8], [a = 2, b = 4], [a = 1, b = 4]})
.Table.PositionOfAny(Table.FromRecords({[a = 2, b = 4], [a = 1, b = 4], [a = 2, b = 4], [a = 1, b = 4]}), {[a = 2, b = 4], [a = 6, b = 8]})
0
Find the position of all the occurrences of [a = 2, b = 4] or [a = 6, b = 8] in the table
({[a = 2, b = 4], [a = 6, b = 8], [a = 2, b = 4], [a = 1, b = 4]}
.Table.PositionOfAny(Table.FromRecords({[a = 2, b = 4], [a = 6, b = 8], [a = 2, b = 4], [a = 1, b = 4]}), {[a = 2, b = 4], [a = 6, b = 8]}, Occurrence.All)
{0, 1, 2}
Last modified 4yr ago