PL-300 Model the data Practice Question
You need to create a calculated column that categorizes products based on price: 'Low' (<$10), 'Medium' ($10-$50), 'High' (>$50). 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
✓
SWITCH(TRUE(), Product[Price] < 10, "Low", Product[Price] <= 50, "Medium", "High")
Option C is correct because SWITCH(TRUE(), ...) evaluates each condition in order and returns the first TRUE result, so Product[Price] < 10 yields "Low", Product[Price] <= 50 yields "Medium", and the fallback "High" covers prices above 50. This pattern is the standard DAX way to implement multi-branch conditional logic with range comparisons. Option A is wrong because SWITCH with a scalar expression compares for equality, not ranges, so <10 and <=50 are not valid match values. Option B is wrong because LOOKUPVALUE retrieves a value from another table by matching columns and does not perform range-based categorization. Option D is wrong because DAX IF only takes three arguments (condition, true result, false result), so passing five arguments is invalid.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
SWITCH(Product[Price], <10, "Low", <=50, "Medium", "High")
Why it's wrong here
This syntax is invalid because SWITCH() in DAX's first form compares a single expression to a set of fixed values, not to relational conditions. The arguments <10 and <=50 are incomplete conditional operators that lack a left operand, and DAX does not allow them as match values. To evaluate ranges, you must either nest IF() functions or use SWITCH(TRUE(), condition, result, ...) so each condition is a Boolean expression.
- ✗
LOOKUPVALUE(Category, Product[Price], Product[Price])
Why it's wrong here
LOOKUPVALUE() retrieves one scalar value from a specified column based on exact matches on one or more search columns; it is not designed to classify rows into categories based on numeric thresholds. Here, using Product[Price] as both the search column and the value to return is nonsensical because it would attempt to return a Category value that doesn't exist in the Product table, and the function would fail due to multiple matches or missing columns. It also offers no mechanism for range comparisons like <10 or <=50.
- ✓
SWITCH(TRUE(), Product[Price] < 10, "Low", Product[Price] <= 50, "Medium", "High")
Why this is correct
This is the canonical SWITCH(TRUE()) pattern for multi-condition categorization. The first argument TRUE() is a literal value, and each subsequent argument is a Boolean condition; DAX evaluates them left-to-right and returns the result associated with the first condition that evaluates to TRUE. The final trailing value 'High' acts as the default/else clause because it has no accompanying condition. This syntax is both valid and efficiently conveys readable business logic in a calculated column.
- ✗
IF(Product[Price] < 10, "Low", Product[Price] <= 50, "Medium", "High")
Why it's wrong here
IF() in DAX has a strict three-argument signature: a condition, a result when TRUE, and a result when FALSE. Passing extra arguments (Product[Price] <= 50 and 'Medium') is a syntax error because the function cannot interpret a third condition. Supporting multiple categories requires nested IF() calls like IF(Price<10,"Low", IF(Price<=50,"Medium","High")), or more cleanly, SWITCH(TRUE(),...). The erroneous option tries to squeeze multi-branch logic into a binary function, which is not how IF works.
Go deeper
Related to this question
About these practice questions
Courseiva writes every PL-300 question from scratch — 524 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.