Data Table Variations: Count Unique

This tool lets you select the column for which you'd like to count the unique values. For basic information about mapping indicators to data tables, first see Data Source: Populate from a Data Table.

To create a Count Unique indicator, set the data table mapping calculation to "Count Unique". Pick the column from the dropdown menu for which unique values should be counted.

The result for this indicator mapping will be the number of unique values in the "Trainee" column.

Selecting Multiple Columns

You can also select multiple columns for which you'd like to count unique sets by clicking "Add column...".

A common example for this is a count of training attendees: you'd like to know how many times a certain type of training has been attended, and you'd like to count people more than once if they have attended multiple types of trainings. In this case, you would count the unique pairs of trainees and training types.

The result for this indicator mapping will be the number of unique pairs of values in the "Trainee" and "Training Type" columns.

What result do I get from Count Unique?

Have a look at the training log below. In this example:

  • Count All would give the result of 10. There are 10 rows.
  • Count Unique for the Trainee column would give you the result of 4. There are 4 different values in this column.
  • Count Unique for both the Trainee and Training Type column would give you the result of 6. There are 6 unique pairs of values in the Trainee and Training Type columns.

Adding Filters

When using Count Uniuqe, you can add filters as usual. Filters are a way of ignoring any rows of your data table that do not meet the critera that you define. In this case, the indicator will pull data from the data table only where the column "Training Type" is set to "Swordsmanship".

For the data table above, this mapping would give you a result of 4. There are 4 unique pairs of pairs of values in the Trainee and Training Type columns where the Training Type column is set to "Swordsmanship".

Additional Notes for Count Unique

  • If you don't count per unique date, the results of the query are assigned to the most recent date in the dynamic table.

  • If you don't count per unique geography, the results of the query are assigned to the largest geographic division in the system, such as the whole country or the whole world.

  • If the indicator is designated to be reported per activity, then the query results calculate separate unique counts for each activity.

  • You can still add filters as usual so that the indicator calculation ignores any rows of data that do not meet the filter criteria.

Didn't answer your question? Please email us. We're here to help.