PL-300 Model the data Practice Question
You have a Power BI model with a table named Orders that contains columns OrderDate, ShipDate, and CustomerID. You need to create a calculated column that computes the number of days between OrderDate and ShipDate. Which DAX expression should you use?
⚠ Common exam trap
The trap here is that candidates might confuse DATEDIFF with DATEADD (which shifts dates) or incorrectly use DAY() on a date difference, thinking it extracts the number of days, when DAY() actually returns the day of the month (1–31).
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
✓
DATEDIFF(Orders[OrderDate], Orders[ShipDate], DAY)
The DATEDIFF function in DAX calculates the interval between two dates in the specified unit (DAY). This directly computes the number of days between OrderDate and ShipDate, which is the required result for the calculated column.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
DATEDIFF(Orders[OrderDate], Orders[ShipDate], DAY)
Why this is correct
DATEDIFF(Orders[OrderDate], Orders[ShipDate], DAY) is correct because the DATEDIFF function in DAX returns the number of interval boundaries crossed between a start date and an end date, with the third argument specifying the interval unit. Here, DAY asks for whole calendar days, so the result is an integer representing the total days from OrderDate to ShipDate. This is the intended calculation for order-to-ship time.
- ✗
DATEADD(Orders[OrderDate], 1, DAY)
Why it's wrong here
DATEADD(Orders[OrderDate], 1, DAY) is wrong because DATEADD is a time-intelligence function that shifts a date by a specified number of intervals, returning a date or a table of dates, not a numeric difference. In this expression, it merely produces a date one day after OrderDate, which says nothing about ShipDate or the duration between the two. Using DATEADD here would not measure the length of time between order placement and shipment.
- ✗
DAY(Orders[ShipDate] - Orders[OrderDate])
Why it's wrong here
DAY(Orders[ShipDate] - Orders[OrderDate]) is wrong because DAY() extracts the day-of-month component from a date or datetime value, not a count of elapsed days. While subtracting two dates in DAX yields a numeric difference in days, passing that number to DAY() coerces it into a date serial number and returns the day-of-month, so a difference of 32 would return 1, not 32. This expression therefore fails for differences beyond the first few weeks and is conceptually incorrect.
- ✗
NETWORKDAYS(Orders[OrderDate], Orders[ShipDate])
Why it's wrong here
NETWORKDAYS(Orders[OrderDate], Orders[ShipDate]) is not a valid DAX expression because NETWORKDAYS is not a native DAX function; it belongs to Excel's function library (and appears in Power Query M as Date.NetworkDays, but not in DAX). In DAX you would need to build a working-day calculation using a calendar table and something like CALCULATE with COUNTROWS over a filtered date table, or write a custom iteration. Consequently, this option would generate a syntax error in a DAX measure or calculated column.
Go deeper
Related to this question
About these practice questions
This PL-300 question is part of Courseiva's 217-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.