Bird
0
0

You have a table with some null and blank values in 'Quantity'. You want to create a measure that counts only non-blank and non-null rows. Which DAX expression is correct?

hard📝 Scenario Q9 of 15
Power BI - Data Cleaning with Power Query
You have a table with some null and blank values in 'Quantity'. You want to create a measure that counts only non-blank and non-null rows. Which DAX expression is correct?
ACOUNTROWS(FILTER(Table, NOT ISBLANK(Table[Quantity])))
BCOUNT(Table[Quantity])
CCOUNTROWS(FILTER(Table, Table[Quantity] <> BLANK()))
DCOUNTROWS(Table) - COUNTBLANK(Table[Quantity])
Step-by-Step Solution
Solution:
  1. Step 1: Understand how to count non-blank rows

    FILTER with NOT ISBLANK() selects rows where Quantity is not blank or null.
  2. Step 2: Use COUNTROWS to count filtered rows

    COUNTROWS counts the filtered rows correctly.
  3. Step 3: Evaluate other options

    COUNT counts non-blank numeric values but may ignore blanks differently; <> BLANK() is invalid syntax; COUNTBLANK counts blanks but subtracting may be less clear.
  4. Final Answer:

    COUNTROWS(FILTER(Table, NOT ISBLANK(Table[Quantity]))) counts non-blank rows correctly -> Option A
  5. Quick Check:

    Filter with NOT ISBLANK() then count rows [OK]
Quick Trick: Filter NOT ISBLANK() then count rows for non-blank count [OK]
Common Mistakes:
  • Using <> BLANK() which is invalid
  • Assuming COUNT counts blanks
  • Subtracting COUNTBLANK from COUNTROWS can be confusing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Power BI Quizzes