Count Distinct

Description

The COUNTD function returns the number of distinct, non-null values within the specified conditions. It filters out duplicate values before counting.

Usage

The function is used to count distinct, non-null values in one or more conditions.

Syntax:
COUNTD(condition1, [condition2], …)

Examples

  1. Count Distinct Process Types:

    COUNTD(#[Process].[Type])
    

    Counts the number of distinct Type values in the Process records within the linked entities table.

  2. Count Distinct Assets with Specific Criteria:

    COUNTD(FILTER(#[Asset].[ID], #[Asset].[Criticality] = "High"))
    

    Counts the number of distinct Asset records where the Criticality is "High" in the linked entities table.

Inputs

Argument Data Type Description
condition1 Any The first condition to count distinct values.
[condition2] Any (Optional) Additional conditions to count.

Returns

Type: Number

  • Produces the count of distinct, non-null values matching the specified conditions.
Was this article helpful?
0 out of 0 found this helpful