Table.IsEmpty
TableReturns true if a table contains no rows.
Syntax
Table.IsEmpty(table as table) as logicalParameters
| Name | Type | Required | Description |
|---|---|---|---|
table | table | Yes | The table to check. |
Return Value
logical — true 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 | |
|---|---|
| 1 | TRUE |
Example 2: Check a non-empty table
let
IsEmpty = Table.IsEmpty(Sales)
in
#table({"IsEmpty"}, {{IsEmpty}})Result
IsEmpty | |
|---|---|
| 1 | FALSE |
Compatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks