This page explains how to use the dcountif aggregation function in APL.
dcountif
aggregation function in Axiom Processing Language (APL) counts the distinct values in a column that meet a specific condition. This is useful when you want to filter records and count only the unique occurrences that satisfy a given criterion.
Use dcountif
in scenarios where you need a distinct count but only for a subset of the data, such as counting unique users from a specific region, unique error codes for specific HTTP statuses, or distinct traces that match a particular service type.
Splunk SPL users
eval
and dc
in the stats
function. APL simplifies this with the dcountif
function, which handles both filtering and distinct counting in a single step.ANSI SQL users
COUNT(DISTINCT)
and CASE
. APL’s dcountif
function provides a more concise and readable way to handle conditional distinct counting.distinct_successful_users |
---|
50 |
id
field) who received a successful HTTP response (status 200), helping you understand how many unique users had successful requests.