List.MatchesAll is a Power Query M function that checks if all values in a list satisfy a specified condition. The function returns true if all values meet the condition, and false otherwise.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
List.MatchesAll(
list as list,
condition as function,
) as logical
Description
Returns true
if the condition function, condition
, is satisfied by all values in the list list
, otherwise returns false
.
Examples
Determine if all the values in the list {11, 12, 13} are greater than 10.
// Output: true
List.MatchesAll( {11, 12, 13}, each _ > 10 )
Determine if all the values in the list {1, 2, 3} are greater than 10.
// Output: false
List.MatchesAll( {1, 2, 3}, each _ > 10 )
Related articles
Learn more about List.MatchesAll in the following articles:
- Lists in Power Query M / List Functions (200+ Examples)
The complete guide to Lists in Power Query M. Learn from practical examples and master Power Query’s most powerful List functions. » Read more
Related functions
Other functions related to List.MatchesAll are:
2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy