Table.RowCount
How many rows a table has.
Group: Table. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Table.RowCount(table as table) as number
| Parameter | Type | Description |
|---|---|---|
table | table | The table to count. |
Returns
number. The number of rows; 0 for a table without rows.
Examples
Three products
Table.RowCount(#table({"Product"}, {{"Chair"}, {"Desk"}, {"Lamp"}}))
3
After a filter that keeps nothing
Table.RowCount(Table.SelectRows(#table({"Product", "Price"}, {{"Chair", 50}, {"Desk", 120}}), each [Price] > 200))
0
Related functions
Table.ColumnCount, Table.IsEmpty, List.Count, Table.ApproximateRowCount.