Bird
Raised Fist0
Power BIbi_tool~5 mins

COUNT and DISTINCTCOUNT in Power BI - Cheat Sheet & Quick Revision

Choose your learning style10 modes available
Recall & Review
beginner

What does the COUNT function do in Power BI?

The COUNT function counts the number of non-empty values in a column.

Click to reveal answer
beginner

What is the difference between COUNT and DISTINCTCOUNT?

COUNT counts all non-empty values, including duplicates.
DISTINCTCOUNT counts only unique non-empty values.

Click to reveal answer
beginner

Write a simple DAX formula to count all sales transactions in a table named Sales using COUNT.

Total Sales = COUNT(Sales[TransactionID])
This counts all non-empty TransactionID values.

Click to reveal answer
beginner

How would you count the number of unique customers in the Sales table?

Use DISTINCTCOUNT on the CustomerID column:
Unique Customers = DISTINCTCOUNT(Sales[CustomerID])

Click to reveal answer
beginner

Why is it important to use DISTINCTCOUNT when counting unique items?

Because it avoids counting duplicates, giving the true number of unique items, like unique customers or products.

Click to reveal answer

What does COUNT(Sales[OrderID]) return?

ANumber of empty OrderID values
BNumber of unique OrderID values
CTotal sum of OrderID values
DNumber of non-empty OrderID values

Which function counts only unique values in a column?

ADISTINCTCOUNT
BSUM
CAVERAGE
DCOUNT

If a column has 10 values with 3 duplicates, what will DISTINCTCOUNT return?

A7
B3
C10
D13

Which DAX formula counts all rows where the column is not empty?

ACOUNTROWS(Table)
BDISTINCTCOUNT(Table[Column])
CCOUNT(Table[Column])
DSUM(Table[Column])

What will COUNT do with empty or blank values?

ACount them as zero
BIgnore them
CCount them as one
DCount only if they are text

Explain in your own words the difference between COUNT and DISTINCTCOUNT in Power BI.

Think about counting all items versus counting only unique items.
You got /4 concepts.

    Describe a real-life example where you would use DISTINCTCOUNT instead of COUNT.

    Imagine you want to know how many different people bought something, not how many total purchases.
    You got /4 concepts.

      Practice

      (1/5)
      1.

      What does the DISTINCTCOUNT function do in Power BI?

      easy
      A. Counts all values including empty ones in a column
      B. Counts the total number of rows in a table
      C. Counts only empty values in a column
      D. Counts the number of unique non-empty values in a column

      Solution

      1. Step 1: Understand DISTINCTCOUNT purpose

        DISTINCTCOUNT counts unique non-empty values in a column, ignoring duplicates and blanks.
      2. Step 2: Compare with other options

        Other options describe counting all values, empty values, or rows, which are incorrect for DISTINCTCOUNT.
      3. Final Answer:

        Counts the number of unique non-empty values in a column -> Option D
      4. Quick Check:

        DISTINCTCOUNT = unique non-empty count [OK]
      Hint: DISTINCTCOUNT counts unique values only, ignoring blanks [OK]
      Common Mistakes:
      • Confusing DISTINCTCOUNT with COUNT
      • Thinking it counts empty or blank values
      • Assuming it counts total rows
      2.

      Which of the following is the correct syntax to count all non-empty values in the Sales[OrderID] column?

      ?
      easy
      A. DISTINCTCOUNT(Sales[OrderID])
      B. COUNT(Sales[OrderID])
      C. COUNTROWS(Sales[OrderID])
      D. COUNTBLANK(Sales[OrderID])

      Solution

      1. Step 1: Identify COUNT syntax

        COUNT(column) counts all non-empty values in the specified column.
      2. Step 2: Eliminate incorrect options

        DISTINCTCOUNT counts unique values, COUNTROWS requires a table, COUNTBLANK counts blanks, so only COUNT is correct here.
      3. Final Answer:

        COUNT(Sales[OrderID]) -> Option B
      4. Quick Check:

        COUNT(column) counts non-empty values [OK]
      Hint: Use COUNT(column) to count non-empty values [OK]
      Common Mistakes:
      • Using COUNTROWS on a column instead of a table
      • Confusing DISTINCTCOUNT with COUNT
      • Using COUNTBLANK instead of COUNT
      3.

      Given the table Products with the Category column containing values: {"Fruit", "Fruit", "Vegetable", "Fruit", "Vegetable", "Grain"}, what is the result of DISTINCTCOUNT(Products[Category])?

      medium
      A. 3
      B. 6
      C. 5
      D. 1

      Solution

      1. Step 1: Identify unique categories

        The unique values in Category are "Fruit", "Vegetable", and "Grain" which totals 3.
      2. Step 2: Apply DISTINCTCOUNT

        DISTINCTCOUNT counts these unique non-empty values, so the result is 3.
      3. Final Answer:

        3 -> Option A
      4. Quick Check:

        DISTINCTCOUNT = 3 unique categories [OK]
      Hint: Count unique values, ignore duplicates [OK]
      Common Mistakes:
      • Counting total rows instead of unique values
      • Confusing DISTINCTCOUNT with COUNT
      • Including duplicates in count
      4.

      Consider this DAX measure:
      UniqueCustomers = COUNT(Customer[CustomerID])
      Why might this measure give an incorrect count of unique customers?

      medium
      A. Because CustomerID column is not numeric
      B. Because COUNT only counts blank values
      C. Because COUNT counts all non-empty values, including duplicates
      D. Because COUNT counts unique values only

      Solution

      1. Step 1: Understand COUNT behavior

        COUNT counts all non-empty values, including duplicates, so it does not count unique customers.
      2. Step 2: Identify correct function for unique count

        To count unique customers, DISTINCTCOUNT should be used instead of COUNT.
      3. Final Answer:

        Because COUNT counts all non-empty values, including duplicates -> Option C
      4. Quick Check:

        COUNT counts duplicates, use DISTINCTCOUNT for unique [OK]
      Hint: Use DISTINCTCOUNT for unique counts, not COUNT [OK]
      Common Mistakes:
      • Assuming COUNT counts unique values
      • Thinking COUNT counts blanks
      • Believing CustomerID must be numeric for COUNT
      5.

      You have a sales table with 1000 rows. The CustomerID column has 900 non-empty values, but only 850 unique customers. Which DAX measure correctly returns the number of unique customers who made a purchase?

      hard
      A. DISTINCTCOUNT(Sales[CustomerID])
      B. COUNTROWS(Sales)
      C. COUNT(Sales[CustomerID])
      D. COUNTBLANK(Sales[CustomerID])

      Solution

      1. Step 1: Understand the data counts

        There are 900 non-empty CustomerID values but only 850 unique customers.
      2. Step 2: Choose measure for unique count

        DISTINCTCOUNT returns the count of unique non-empty values, which is 850, the correct unique customer count.
      3. Final Answer:

        DISTINCTCOUNT(Sales[CustomerID]) -> Option A
      4. Quick Check:

        Use DISTINCTCOUNT for unique customer count [OK]
      Hint: Use DISTINCTCOUNT to get unique counts, not COUNT [OK]
      Common Mistakes:
      • Using COUNT which counts duplicates
      • Using COUNTROWS which counts all rows
      • Using COUNTBLANK which counts blanks
      Recommended

      Ready to prove it?

      Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

      10 questions~5 mineasy hard