Table.IsEmpty is a Power Query M function that determines if a table has any rows. The function returns true if there are no rows in the table, and false otherwise.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Table.IsEmpty( table as table ) as logical
Description
Table.IsEmpty indicates whether the table contains any rows. It returns true
if the table
is empty (no rows) and false
otherwise.
Examples
Determine if the table is empty.
// Output: false
Table.IsEmpty(
Table.FromRecords( {
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"]
} )
)
Determine if the table ( {} )
is empty.
// Output: true
Table.IsEmpty( Table.FromRecords( {} ) )
Related functions
Other functions related to Table.IsEmpty are:
- Table.HasColumns
- Table.IsDistinct
- Table.MatchesAllRows
- Table.MatchesAnyRows
- Table.Profile
- Table.Schema
- Tables.GetRelationships
2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy