Table.IsEmpty

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

Indicates whether the table contains any rows. Returns true if there are no rows (i.e. the table is empty), 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:

BI Gorilla Youtube Channel

Last update: August 25, 2023 | Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/table-isempty
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.