Courseiva
Model the data →easyMultiple Choice

PL-300 Model the data Practice Question

You have a Power BI data model with a table 'Orders' that has columns: 'OrderID', 'OrderDate', 'CustomerName', 'Region', 'Product', 'Quantity', 'UnitPrice'. You want to create a measure that calculates total sales amount. Which DAX expression should you use?

⚠ Common exam trap

The trap here is that candidates mistakenly think SUM can handle a column expression like `Quantity * UnitPrice` directly, but DAX requires an iterator function like SUMX for row-level arithmetic, and they may also confuse the product of averages with the sum of products.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Total Sales = SUMX(Orders, Orders[Quantity] * Orders[UnitPrice])

SUMX is an iterator function that evaluates the expression `Orders[Quantity] * Orders[UnitPrice]` for each row in the Orders table and then sums the results. This is necessary because DAX does not support direct multiplication of two columns inside SUM; SUM expects a single column reference, not an expression. SUMX performs row-by-row evaluation, which correctly computes the total sales amount as the sum of (Quantity × UnitPrice) across all orders.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Total Sales = COUNTROWS(Orders)

    Why it's wrong here

    COUNTROWS(Orders) simply returns the number of rows in the Orders table, which corresponds to the count of individual order line items or transactions. It completely ignores the Quantity and UnitPrice columns, so it cannot represent total sales revenue. This measure would only be valid if every order had exactly one unit at a price of $1, which is not the case.

  • ✗

    Total Sales = AVERAGE(Orders[Quantity]) * AVERAGE(Orders[UnitPrice])

    Why it's wrong here

    This expression multiplies the average quantity by the average unit price, which is a mathematical shortcut that does not equal the average revenue per row, let alone the total revenue. Because averages lose the correlation between quantity and price for each specific order, the product of averages systematically over- or understates the true per-row revenue. Total sales requires summing the actual quantity times price per row, not combining two separate aggregates.

  • ✗

    Total Sales = SUM(Orders[Quantity] * Orders[UnitPrice])

    Why it's wrong here

    SUM(Orders[Quantity] * Orders[UnitPrice]) is syntactically invalid in DAX because the SUM function accepts a single column reference, not an expression that computes a value across columns. Even if the syntax were changed to something like SUM(Orders[Quantity]) * SUM(Orders[UnitPrice]), that would also be incorrect because it multiplies separate totals, introducing a cross-product error. The correct DAX pattern for a calculated column expression is to iterate row-by-row using SUMX.

  • ✓

    Total Sales = SUMX(Orders, Orders[Quantity] * Orders[UnitPrice])

    Why this is correct

    SUMX(Orders, Orders[Quantity] * Orders[UnitPrice]) is the correct way to compute total sales because it iterates over each row of the Orders table, evaluates the expression Quantity * UnitPrice for that row, and then sums all the row-level results. This preserves the row context and correctly handles varying quantities and prices across different orders. It is the standard pattern for row-by-row multiplication followed by aggregation, avoiding the pitfalls of using SUM with an expression or multiplying aggregates.

About these practice questions

One of 524 original PL-300 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PL-300 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PL-300 exam.