Table.IsEmpty

Table

Returns true if a table contains no rows.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Table.IsEmpty(table as table) as logical

Parameters

NameTypeRequiredDescription
tabletableYesThe table to check.

Return Value

logicaltrue if the table has zero rows, false otherwise.

Remarks

Table.IsEmpty returns true if the table has no rows. This is more readable and efficient than checking Table.RowCount(table) = 0. It is commonly used in conditional logic — for example, checking whether a filter returned any results before performing further operations.

Examples

Example 1: Check if filtered table is empty

let
    Filtered = Table.SelectRows(Sales, each [Region] = "South"),
    IsEmpty = Table.IsEmpty(Filtered)
in
    #table({"IsEmpty"}, {{IsEmpty}})
Result
IsEmpty
1TRUE

Example 2: Check a non-empty table

let
    IsEmpty = Table.IsEmpty(Sales)
in
    #table({"IsEmpty"}, {{IsEmpty}})
Result
IsEmpty
1FALSE

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks