exam questions

Exam PL-300 All Questions

View all questions & answers for the PL-300 exam

Exam PL-300 topic 2 question 70 discussion

Actual exam question from Microsoft's PL-300
Question #: 70
Topic #: 2
[All PL-300 Questions]

You have a Power BI model that contains a table named Sales. The Sales table contains the following columns:

• Order Line ID
• Product ID
• Unit Price
• Order ID
• Quantity

Orders are uniquely identified by using the order ID and can have multiple order lines. Each order line within an order contains a different product ID.

You need to write a DAX measure that counts the number of orders.

Which formula should you use?

  • A. Count('Sales'[Order ID])
  • B. CountA('Sales' [Order ID])
  • C. CountRows('Sales')
  • D. DistinctCount('Sales' [Order ID])
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
SanaCanada
Highly Voted 1 year, 11 months ago
Selected Answer: A
Order only once but can have multiple line based of different procduct Order ID A000101....Product A Order ID A000101.....Product B Order ID A000101....Product C Order ID A000101....Product D Correct Answer only D No confusion, and no need to discuss further
upvoted 43 times
kelvin3105
1 year, 8 months ago
you had put A as selected answer
upvoted 23 times
itenginerd
1 year, 5 months ago
Apparently there is confusion and a need to discuss further?
upvoted 44 times
SKUKDE
9 months, 2 weeks ago
seriously
upvoted 1 times
...
reignreign03
1 year, 4 months ago
I hate it when someone says there's no need to discuss further. Like are u from Microsoft or what?
upvoted 39 times
LeeTheRed
1 year, 3 months ago
There's no confussion that the person is clearly confuse so no need to discuss further!
upvoted 8 times
...
...
...
...
benni_ale
1 year, 1 month ago
thanks there is no need for no confusion in my no thinking head
upvoted 5 times
...
...
Maria86
Highly Voted 1 year, 11 months ago
Selected Answer: D
"Orders are uniquely identified by using the order ID and can have multiple order lines" - I think the important statement is "and can have multiple order lines" which means that the order ID can appear more than once in the table if the order contains more than one products - so I think the answer is correct.
upvoted 38 times
...
5bf040d
Most Recent 4 days, 3 hours ago
Selected Answer: D
D. DistinctCount('Sales' [Order ID]) Why DISTINCTCOUNT? The DISTINCTCOUNT function counts the number of unique values in a column. Since each order can have multiple order lines (rows) in the Sales Table (Fact Table) using DISTINCTCOUNT ensures that each Order ID is counted only once, regardless of how many times it appears in the table.
upvoted 1 times
...
tko86
3 months ago
Selected Answer: D
It's D. Reason being is that each order would contain multiple order lines. If you were to do a simple Count, it would inflate the number of orders as it would also count each line. The question is, write a DAX to return the number of orders. Using DISTINCTCOUNT('Sales'[Order ID]) would return the distinct count of Orders.
upvoted 1 times
...
jaume
3 months, 3 weeks ago
Selected Answer: D
I think it's D option. As it could be several rows with same OrderID because each order could have multiple Order Lines (one row per Order Line so multiple rows for the Order Id), DISTINCCOUNT must be used to prevent counting twice (or 3, or 4...) same Order.
upvoted 1 times
...
539d541
6 months, 3 weeks ago
Selected Answer: D
D is correct. SanaCanada is a bit loco
upvoted 4 times
...
rcaliandro
6 months, 4 weeks ago
Selected Answer: D
The correct answer is D
upvoted 1 times
...
rcaliandro
7 months ago
Selected Answer: D
The correct answer is D: DistinctCount('Sales' [Order ID])
upvoted 2 times
...
HenryBiz
10 months, 3 weeks ago
Selected Answer: D
Order ID will be repeated if more than one product lines are in that order. So, I think distinctcount is necessary.
upvoted 1 times
...
Dani_eL
1 year ago
Selected Answer: D
Count only supports :Numbers,Dates,Strings CountA also supports Boolean CountRows will return values depending on relatedtable if any else counts number of rows in table DistinctCount as it says "distinct" counts distinct values (same as sql select distinct statement) Answer is D
upvoted 4 times
...
lukelin08
1 year, 2 months ago
Selected Answer: D
D is correct
upvoted 2 times
...
tienanbich
1 year, 2 months ago
Selected Answer: D
D is correct
upvoted 2 times
...
Starvosxant
1 year, 3 months ago
Fact tables dont have primary key. So, you cant assume that order id is unique. Thats why a lot of you are voting for countrows or count. The right answer is distinct count
upvoted 2 times
Florinuca
1 year ago
Yes, in the fact table we can have multiple rows with the same OrderID. The correct answer is D.
upvoted 1 times
...
...
Ryan_042
1 year, 4 months ago
Selected Answer: D
D for sure
upvoted 2 times
...
TrustMyAnswers
1 year, 4 months ago
Selected Answer: D
Answer is D.
upvoted 2 times
...
floatfloat
1 year, 5 months ago
Selected Answer: C
Why not C?
upvoted 1 times
reignreign03
1 year, 4 months ago
Because the number of rows in the table does not directly translate to the number of distinct Order IDs
upvoted 1 times
...
...
thomas_90
1 year, 5 months ago
Absolutely agree with answer is D.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago