Description
The COUNTDISTINCTX
function calculates a value for each row in the table, and then counts the number of calculated values that are non-blank.
Usage
COUNTDISTINCTX(TABLE_EXPR, EXPRESSION)
Example
You can use the COUNTDISTINCTX
function in a pivot table to count the unique number of beneficiaries, using the phone number field:
COUNTDISTINCTX([Beneficiary Registry], PHONE_NUMBER)
The second argument can be expression in a row context, for example if we wanted to count the number of distinct full names, we could use the CONCAT function to combine first and last names together:
COUNTDISTINCTX([Beneficiary Registry], CONCAT(FIRST_NAME, " ", LAST_NAME))