PL-300 Prepare the data Practice Question
You have a Power BI data model with a 'Sales' fact table and a 'Date' dimension. You need to create a calculated column in the 'Sales' table that shows the fiscal year based on a 'Date' column. The fiscal year starts on July 1. Which DAX expression should you use?
⚠ Common exam trap
It's easy for candidates to assume YEAR() alone is sufficient for fiscal year calculations, overlooking the need to adjust for the fiscal year start month, or they incorrectly add 1 to all years instead of conditionally shifting only the first half of the calendar year.
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(), MONTH(Sales[Date]) >= 7, YEAR(Sales[Date]), YEAR(Sales[Date])-1)
It uses SWITCH with TRUE() to evaluate a logical condition: if the month of the date is July or later (MONTH >= 7), it returns the current year; otherwise, it returns the previous year. This correctly implements a fiscal year starting on July 1, as required.
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(TRUE(), MONTH(Sales[Date]) >= 7, YEAR(Sales[Date]), YEAR(Sales[Date])-1)
Why this is correct
SWITCH(TRUE(), MONTH(Sales[Date]) >= 7, YEAR(Sales[Date]), YEAR(Sales[Date]) - 1) evaluates boolean conditions sequentially; for any date with month 7 or later it returns the current calendar year, which equals the fiscal year for a July-start fiscal year. For months January through June, it subtracts one, correctly assigning those dates to the prior fiscal year. This expression returns an integer, preserving numeric sorting and supporting direct use in relationships or calculated columns.
- ✗
YEAR(Sales[Date])
Why it's wrong here
YEAR(Sales[Date]) alone extracts only the calendar year component, ignoring the fiscal-year offset. While it matches the fiscal year for July through December, it incorrectly labels January through June as the current calendar year instead of the prior fiscal year. This creates a grouping error that undercounts or misattributes sales in the first half of each calendar year when compared to a July-start fiscal calendar.
- ✗
YEAR(Sales[Date]) + 1
Why it's wrong here
YEAR(Sales[Date]) + 1 blindly increments every calendar year by one, making every date fall into the next year. For a fiscal year that begins in July, only months January through June should have YEAR - 1; this formula overcorrects all dates, including July-December which already belong to the current calendar year. The result is a systematic one-year-ahead shift that fails the fiscal year definition entirely.
- ✗
FORMAT(Sales[Date], "YYYY")
Why it's wrong here
FORMAT(Sales[Date], "YYYY") returns a text string of the calendar year, not a numeric value. Because it uses the calendar year without any fiscal adjustment, it has the same misclassification problem as YEAR(), but it also introduces data-type and sorting issues: text values sort lexicographically, so '999' can precede '1000' and monthly order breaks. In DAX and Power Query, such text years cannot be used reliably in date hierarchies or as numeric keys.
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.