Table.ApproximateRowCount
Counts a table's rows, for sources where an estimate is good enough.
Group: Table. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Table.ApproximateRowCount(table as table) as number
| Parameter | Type | Description |
|---|---|---|
table | table | The table to count. |
Returns
number. How many rows the table has.
Remarks
- In OpenBI the count is exact: the same number as
Table.RowCount. On a database source it is counted in SQL, without reading the rows.
Compared with Power Query
Power Query may give an estimate for some sources; OpenBI always counts exactly.
Examples
Three products
Table.ApproximateRowCount(#table({"Product", "Price", "Units"}, {{"Chair", 50, 4}, {"Desk", 120, 1}, {"Lamp", 30, 6}}))
3