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
- intermediate~8 minPro
Summarise orders by region (kite shop)
Group by Region with order count, total quantity and average unit price, sorted by region.
- intermediate~8 minPro
Count distinct customers per product (kite shop)
For each product, count how many different customers ordered it.
- advanced~10 minPro
Show each region's share of total revenue (kite shop)
Total revenue per region, then each region's percentage of the grand total.
- intermediate~8 minPro
Find each region's first and last order date (kite shop)
Group by Region with the earliest and latest OrderDate as real dates.