Power BI Data Analyst (PL-300) · Free practice question 4 of 12
DISTINCTCOUNT for order count
An OrderLines table at Pinecrest Books has one row per book in each order, so each OrderNumber appears several times. Which measure returns the number of orders?
- A.SUM(OrderLines[OrderNumber])
- B.DISTINCTCOUNT(OrderLines[OrderNumber])
- C.COUNTROWS(OrderLines)
- D.COUNT(OrderLines[OrderNumber])
Show answer and explanation
Correct answer: B. DISTINCTCOUNT(OrderLines[OrderNumber])
Why: DISTINCTCOUNT counts each order number once, no matter how many lines the order has. COUNT and COUNTROWS both count every line, which overstates the number of orders, and summing order numbers produces a meaningless total.