0
0
Power BIbi_tool~20 mins

COUNT and DISTINCTCOUNT in Power BI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
COUNT and DISTINCTCOUNT Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
dax_lod_result
intermediate
2:00remaining
Calculate total sales count with COUNT

You have a Sales table with a column OrderID. Which DAX measure correctly counts all sales orders, including duplicates?

ATotal Sales Count = COUNT(Sales[OrderID])
BTotal Sales Count = DISTINCTCOUNT(Sales[OrderID])
CTotal Sales Count = COUNTROWS(Sales)
DTotal Sales Count = COUNT(Sales)
Attempts:
2 left
💡 Hint

Think about counting all rows with a specific column, including duplicates.

visualization
intermediate
2:00remaining
Choose the best visual for comparing COUNT and DISTINCTCOUNT

You want to show the difference between total sales orders and unique customers in a report. Which visual is best to clearly show both counts side by side?

AA clustered column chart with two bars: one for total orders (COUNT) and one for unique customers (DISTINCTCOUNT)
BA pie chart showing total orders only
CA line chart showing total orders over time only
DA table listing all orders without aggregation
Attempts:
2 left
💡 Hint

Think about comparing two related numbers side by side.

🧠 Conceptual
advanced
2:00remaining
Understanding COUNT vs DISTINCTCOUNT behavior with blanks

Given a column with values: {1, 2, 2, BLANK, 3, BLANK}, what are the results of COUNT and DISTINCTCOUNT on this column?

ACOUNT = 6, DISTINCTCOUNT = 4
BCOUNT = 4, DISTINCTCOUNT = 3
CCOUNT = 5, DISTINCTCOUNT = 3
DCOUNT = 4, DISTINCTCOUNT = 4
Attempts:
2 left
💡 Hint

Remember that COUNT ignores blanks but DISTINCTCOUNT counts unique non-blank values.

🔧 Formula Fix
advanced
2:00remaining
Identify the error in this DAX measure using COUNT

What error will this DAX measure cause?
TotalCount = COUNT(Sales)

Power BI
TotalCount = COUNT(Sales)
AReturns distinct count of Sales table
BReturns total rows count of Sales table
CSyntax error: COUNT requires a column, not a table
DRuntime error: invalid function usage
Attempts:
2 left
💡 Hint

Check the function argument type requirements.

🎯 Scenario
expert
3:00remaining
Calculate unique customers per region excluding blanks

You have a Customer table with columns CustomerID and Region. Some CustomerID values are blank. You want a measure that counts unique customers per region, ignoring blanks. Which DAX measure is correct?

AUnique Customers = DISTINCTCOUNT(Customer[CustomerID])
BUnique Customers = COUNTROWS(FILTER(Customer, NOT(ISBLANK(Customer[CustomerID]))))
CUnique Customers = COUNT(Customer[CustomerID])
DUnique Customers = CALCULATE(DISTINCTCOUNT(Customer[CustomerID]), Customer[CustomerID] <> BLANK())
Attempts:
2 left
💡 Hint

Think about filtering out blanks before counting distinct customers.