Bird
0
0

You wrote this DAX measure to get unique products:

medium📝 Formula Fix Q6 of 15
Power BI - Data Cleaning with Power Query
You wrote this DAX measure to get unique products:
UniqueProducts = DISTINCT(Sales[ProductID])
But Power BI shows an error. What is the problem?
AProductID column does not exist
BDISTINCT cannot be used in measures
CDISTINCT returns a table, not a scalar value
DSyntax error: missing parentheses
Step-by-Step Solution
Solution:
  1. Step 1: Understand DISTINCT output type

    DISTINCT returns a table of unique values, not a single number or scalar.
  2. Step 2: Measures require scalar values

    Measures must return a single value, so using DISTINCT alone causes an error.
  3. Final Answer:

    DISTINCT returns a table, not a scalar value -> Option C
  4. Quick Check:

    DISTINCT returns table, not scalar [OK]
Quick Trick: DISTINCT returns table; use aggregation for scalar [OK]
Common Mistakes:
  • Using DISTINCT directly in measures without aggregation
  • Assuming DISTINCT returns a number
  • Ignoring error message about return type

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Power BI Quizzes