PL-300 Prepare the data Practice Question
You are importing data from a CSV file that contains a column 'OrderDate' with dates in the format 'MM/dd/yyyy'. Some rows have invalid dates like '02/30/2023'. What is the best way to handle these errors in Power Query?
⚠ Common exam trap
A common mix-up: candidates choose 'Remove Errors' (Option B) thinking it cleans the data, but they overlook that it deletes entire rows, which may discard valid data in other columns — a common mistake in data preparation scenarios.
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
✓
Use 'Replace Errors' to replace error values with null.
'Replace Errors' in Power Query allows you to replace error values (which occur when Power Query fails to convert an invalid date like '02/30/2023' to the Date type) with null. This preserves the rest of the data and keeps the query running without interruption, while clearly marking invalid entries for later handling or analysis.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use 'Replace Errors' to replace error values with null.
Why this is correct
Replacing errors with null in Power Query is a non-destructive transformation that explicitly substitutes each invalid date value with a null while keeping the row intact. You apply it to the date column (Home > Replace Errors or context menu) and specify null as the replacement value. This preserves all other column values for that row and produces a clean, nullable date column that the data model handles naturally, e.g., through blanks in visuals or DAX functions like CALCULATE with filters. It also avoids the risk of load failure due to leftover errors.
- ✗
Remove rows with errors using 'Remove Rows' > 'Remove Errors'.
Why it's wrong here
Remove Rows > Remove Errors is a row-level operation that deletes the entire record for any row containing an error at the selected column(s), even if only the date column is invalid. This is unnecessarily destructive because it discards other valid columns (e.g., customer ID, sales amount), causing data loss and potential bias in aggregations. In Power Query, it may also remove rows that have errors in unselected columns if you don't scope it to the date column, compounding the problem. Use Replace Errors when you need to preserve row context.
- ✗
Change the data type to 'Date' and ignore errors.
Why it's wrong here
Power Query's data type change dialog does not offer an 'ignore errors' option—when you coerce a column to Date, any value that cannot be parsed becomes an error value in that column. 'Ignoring' errors is not a real action; the error values remain, and on load, Power Query throws an error that causes the refresh to fail. Even if you attempt to continue, downstream steps will propagate these errors, and visuals will be blocked. You must explicitly handle errors after the type conversion—using Replace Errors or Remove Errors—to ensure a clean load.
- ✗
Filter the column to exclude rows where the date is invalid after type conversion.
Why it's wrong here
Filtering out invalid dates after a type conversion is not feasible because errors are not filterable values in the Power Query filter interface; the column shows '(Error)' and the filter UI does not allow selecting or excluding error values. To do this you would need to add a calculation column using try/otherwise logic to test each date string before conversion, then filter on that flag—a multi-step workaround that is more complex and less efficient than a single Replace Errors step. Additionally, filtering out rows discards whole records, similar to Remove Errors, which undermines the goal of preserving data.
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.