Syntax
Table.ApproximateRowCount(table as table) as number
About
如果数据源不支持近似值,则返回近似行 table数,或返回错误。
示例 1
估计大型表中城市和州的不同组合的数目,该组合可用作列的基数估计。 基数估计足够重要,各种数据源(如 SQL Server)都支持这种特定的近似值,通常使用称为 HyperLogLog 的算法。
用法
Table.ApproximateRowCount(Table.Distinct(Table.SelectColumns(sqlTable, {"city", "state"})))
输出
number