This page explains how to use the dcount aggregation function in APL.
dcount
aggregation function in Axiom Processing Language (APL) counts the distinct values in a column. This function is essential when you need to know the number of unique values, such as counting distinct users, unique requests, or distinct error codes in log files.
Use dcount
for analyzing datasets where it’s important to identify the number of distinct occurrences, such as unique IP addresses in security logs, unique user IDs in application logs, or unique trace IDs in OpenTelemetry traces.
dcount
aggregation in APL is a statistical aggregation that returns estimated results. The estimation comes with the benefit of speed at the expense of accuracy. This means that dcount
is fast and light on resources even on a large or high-cardinality dataset, but it doesn’t provide precise results.Splunk SPL users
dc
function within the stats
command. In APL, the dcount
function offers similar functionality.ANSI SQL users
COUNT
with the DISTINCT
keyword. In APL, dcount
provides a direct and efficient way to count distinct values.distinct_users |
---|
45 |
id
field, representing the number of unique users who accessed the system.countif
when you want to count records based on a filter or condition.