PL-300 Model the data Practice Question
You have a Power BI model with a table 'Sales' and a related 'Product' table. You want to count the number of distinct products sold. Which DAX expression should you use?
⚠ Common exam trap
Watch out — candidates often confuse COUNT, COUNTA, and COUNTROWS with DISTINCTCOUNT, mistakenly thinking any counting function will yield distinct values, but only DISTINCTCOUNT explicitly removes duplicates.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
DISTINCTCOUNT(Sales[ProductID])
DISTINCTCOUNT(Sales[ProductID]) returns the number of unique ProductID values in the Sales table, which directly answers the requirement to count distinct products sold. This function counts each distinct value in the specified column, ignoring duplicates, and is the standard DAX measure for distinct count calculations.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
COUNTROWS(Sales)
Why it's wrong here
COUNTROWS(Sales) returns the total number of rows in the Sales table, not the number of distinct products. Because each product appears in many transaction rows, this value far exceeds the unique product count, especially in a fact table with repeated ProductID values. It also ignores neither blanks nor duplicates, making it unsuitable for measuring distinct product coverage.
- ✗
COUNT(Sales[ProductID])
Why it's wrong here
COUNT(Sales[ProductID]) counts only cells that contain a non-blank value, but it evaluates each occurrence individually. For the same ProductID repeated across multiple sales rows, COUNT increments for every row, so duplicates are counted multiple times. This yields the total number of item entries rather than the number of unique products.
- ✓
DISTINCTCOUNT(Sales[ProductID])
Why this is correct
DISTINCTCOUNT(Sales[ProductID]) evaluates the ProductID column within the current filter context and returns the number of unique, non-blank values. It automatically removes duplicates and ignores blanks, providing the exact cardinality of products sold. This is the standard DAX function for 'count of distinct instances' in scenarios like this, and it respects the existing relationship filtering from related tables.
- ✗
COUNTA(Sales[ProductID])
Why it's wrong here
COUNTA(Sales[ProductID]) counts all non-empty values in the column, including duplicates, and works for both text and numeric data. Unlike COUNTA, DISTINCTCOUNT would collapse repeated ProductIDs into a single count; COUNTA does not perform any deduplication. Therefore, it returns a count of every non-blank ProductID in the filtered rows, overstating the number of distinct products.
About these practice questions
Courseiva writes every PL-300 question from scratch — 524 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PL-300 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PL-300 exam.