Counting Distinct Things
Part of the Power BI Basics section of Coddy's Power BI journey. Lesson 10 of 28.
DISTINCTCOUNT counts each different value of a column once.
Customers = DISTINCTCOUNT(Sales[CustomerID])A customer with ten orders has ten rows but counts once.
Challenge
BeginnerHow many different customers does each shop have? Write Customers, counting each Sales[CustomerID] once. It is checked for each store.
Try it yourself
Customers =| Store | Customers |
|---|---|
| Lisbon Riverside | |
| Porto Ribeira | |
| Madrid Centro | |
| Barcelona Gracia | |
| Berlin Mitte | |
| Total |
- Sales
- Products
- Stores
- StoreID
- Store
- City
- Country
- OpenDate
- Customers
- Dates
- Targets
All lessons in Power BI Basics
2Your First Measures
What a Measure IsCounting RowsAverage, Min and MaxCounting Distinct ThingsMeasures Can Do MathSafe Division with DIVIDEMeasures Use Other MeasuresRecap - The Numbers Mia Wants