distinct_count(), dc()

Table of Contents

Definition

distinct_count() and its abbreviation dc() calculates the distinct values for the selected table column. The values in table column are processed as strings.

You can use distinct_count() with transform commands that support aggregations.

Examples

Use distinct_count() or its abbreviation dc() to calculate the distinct values in the selected table column.

%dpl
index=crud earliest=-3y
| stats distinct_count(balance) by operation
%dpl
index=crud earliest=-3y
| chart dc(balance) by operation
example of distinct count function

Further Reading