List.Intersect
This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.
Returns a list from a list of lists and intersects common items in individual lists. Duplicate values are supported.
List.Intersect(list as list /* { List } */,optional equationCriteria as any) as list
| Argument | Description |
|---|---|
| list | The List of lists to check. |
| optional equationCriteria | An optional equation criteria value to control equality comparisons. For more information about equality comparisons, see Parameter Values. |
- If nothing is common in all lists, an empty list is returned.
List.Intersect({ {1..5}, {2..6}, {3..7} }) equals {3..5}
List.Intersect({ {1..5}, {4..8}, {7..11} }) equals {}
List.Intersect({ {1, 1, 1, 2}, {1, 1, 2, 2} }) equals {1, 1, 2}
Show: