Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
The function documentation says that List.MatchesAll returns true if the condition function is satisfied by all values in the list, otherwise returns false.
Given a value x, I'd expect List.MatchesAll({}, each _ = x) to return false - how can the contents of the list all satisfy the condition of being equal to x if the list does not have any contents against which to test the condition?
For every value of x I've tried:
List.MatchesAll({}, each _ = x) returns true
List.MatchesAny({}, each _ = x) returns false
List.Contains({}, x) returns false
Can anyone explain this behaviour and why it is different for List.MatchesAll than it is for List.MatchesAny and List.Contains?
I wouldn't have guessed that behavior either, but I suspect it starts to iterate through the list with a TRUE condition, and since the list is empty there are no iterations/evaluations. If you use {null} instead of {} it evaluates as FALSE, as it does do one iteration.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |