Table.IsEmpty

Updated on

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( {} ) )

Other functions related to Table.IsEmpty are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/table-isempty