Returns the approximated distinct count of dimension items for the selected dimension. The function uses the HyperLogLog (HLL) method of approximating distinct counts. It is configured to guarantee the value is within 5% of the actual value 95% of the time.
Approximate Count Distinct (dimension)
|dimension||The dimension for which you want the approximate distinct item count.|
Approximate Count Distinct (customer ID eVar) is a common use case for this function.
Definition for a new ‘Approximate Customers’ calculated metric:
This is how the "Approximate Customers" metric could be used in reporting:
Like Count() and RowCount(), Approximate Count Distinct() is subject to "uniques exceeded" limits. If the "uniques exceeded" limit is reached within a particular month for a dimension, the value is counted as 1 dimension item.
Approximate Count Distinct() is an improvement over Count() and RowCount() functions because the metric created can be used in any dimensional report to render an approximated count of items for a separate dimension. For example, a count of customer IDs used in a Mobile Device Type report.
This function will be marginally less accurate than Count() and RowCount() because it uses the HLL method, whereas Count() and RowCount() are exact counts.