PL-300 Model the data Practice Question
You are building a Power BI report for a multinational corporation. The data model includes a fact table named Orders with columns: OrderID, CustomerID, OrderDate, ProductID, Quantity, UnitPrice, and Discount. The Customer dimension contains columns: CustomerID, CustomerName, Country, and Segment. The Product dimension contains: ProductID, ProductName, Category, Subcategory, and Price. You need to create a calculated column in the Orders table that calculates the net amount after discount for each order line (Quantity * UnitPrice * (1 - Discount)). You also need to ensure that the column is stored in the model for high-performance filtering. Which DAX expression should you use?
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
✓
NetAmount = Orders[Quantity] * Orders[UnitPrice] * (1 - Orders[Discount])
Option B is correct because a calculated column in the Orders table must use row context, and the expression Orders[Quantity] * Orders[UnitPrice] * (1 - Orders[Discount]) evaluates row by row and is stored in the model for high-performance filtering. Option A is wrong because SUMX is an iterator that returns a scalar aggregate, not a row-level calculated column, and it would not produce a per-order-line value. Option C is wrong because CALCULATE with SUM aggregates the entire table and also misapplies the discount logic, rather than computing each row's net amount. Option D is wrong because it subtracts the discount value directly instead of applying the percentage discount to Quantity * UnitPrice.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
NetAmount = SUMX(Orders, Orders[Quantity] * Orders[UnitPrice] * (1 - Orders[Discount]))
Why it's wrong here
This option uses SUMX, an iterator that evaluates an expression for all rows in the Orders table and returns a single aggregated total. In a calculated column, DAX requires a row-wise expression that produces one value per row for storage; SUMX instead aggregates the whole table and therefore cannot create a stored per-row NetAmount column. If a measure were intended, SUMX would be appropriate, but as a calculated-column definition it is syntactically wrong and returns an aggregate scalar repeated for every row.
- ✓
NetAmount = Orders[Quantity] * Orders[UnitPrice] * (1 - Orders[Discount])
Why this is correct
This is the correct calculated column expression because it uses direct column references in row context, so for each order row it computes Quantity multiplied by UnitPrice, then multiplies by (1 - Discount) to apply the discount proportionally. The calculation respects the percentage nature of the discount and yields the net amount for that individual line item. The result is evaluated row by row and stored physically in the table, making it available for use as a column in reports.
- ✗
NetAmount = CALCULATE(SUM(Orders[Quantity]) * SUM(Orders[UnitPrice]) * (1 - SUM(Orders[Discount])))
Why it's wrong here
Here CALCULATE with SUM functions forces an aggregate calculation over the entire Orders table, ignoring the row context of a calculated column. Because CALCULATE applies context transition in measures but in a calculated-column definition with no filter, SUM sums all quantities, all unit prices, and all discounts, producing one global scalar value that would be repeated on every row rather than a line-level NetAmount. It also incorrectly sums the Discount column across rows, which does not represent a single order's discount and would yield a nonsensical per-row result.
- ✗
NetAmount = Orders[Quantity] * Orders[UnitPrice] - Orders[Discount]
Why it's wrong here
This expression subtracts the raw Discount value from the product of Quantity and UnitPrice instead of reducing the price by a percentage. Since Discount is presumably a decimal like 0.15, subtracting it would only lower the total by 0.15 currency units, not by 15%; the correct formula multiplies by (1 - Discount). Even setting that aside, the absence of parentheses around the subtraction respects conventional order of operations, but the formula's unit logic is fundamentally wrong for a percentage-based discount.
Go deeper
Related to this question
About these practice questions
This PL-300 question is part of Courseiva's 524-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
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.