Table.ContainsAny

Shows if any of the specified records in the list of rows appear in the table. You can specify an optional equationCriteria parameter to determine how the rows in the table should be compared.

Syntax

Table.ContainsAny(table as table, rows as list, optional equationCriteria as any) as logical

About

Shows if any of the specified records in the list of rows appear in the table. You can specify an optional equationCriteria parameter to determine how the rows in the table should be compared.

Explanation

Check if the table contains specific rows based on their values. Use the Power Query M function Table.ContainsAny to determine if the table contains the rows with specified values. The function compares the rows in the table with the specified rows and returns true if any of the specified rows are found in the table. In the first example, we are checking if the table contains the rows [a = 1, b = 2] or [a = 3, b = 5]. The output will be true if either of these rows is present in the table. In the second example, the rows being checked are [a = 1, b = 3] and [a = 3, b = 5]. The output will be false because neither of these rows is found in the table. In the third example, we are comparing only the column [a] in the rows [a = 1, b = 3] and [a = 3, b = 5] to determine if they exist in the table. The output will be true if either of these rows, based on the [a] column value, is present in the table.