Power QueryExercises

Count distinct

The number of different values, as opposed to the number of rows: List.Count(List.Distinct(list)).

Distinct counts answer questions like how many customers ordered this month, where rows would over-count repeat buyers. Clean values first, because "ana@x.example" and "Ana@x.example" count as two. In Group By, Count Distinct Rows counts distinct whole rows per group, not distinct values of one column.

In the Power Query editor

Group By → Count Distinct Rows, or each List.Count(List.Distinct([Customer])) in an advanced aggregation.

Learn more

Related functions

Practise it

Related terms