PL-300 Prepare the data Practice Question
You are preparing a Power BI dataset that will be used by report authors. The source data contains a column named 'CustomerName' with leading and trailing spaces. You need to remove these spaces in Power Query. Which transformation should you use?
⚠ Common exam trap
Test-takers frequently confuse Trim with Clean, where Clean removes non-printable characters but does not affect ordinary spaces.
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
✓
Trim
The Trim transformation is specifically designed to remove leading and trailing whitespace from text values. It preserves internal spaces, ensuring names remain intact. Other transformations either target different issues or would alter the data incorrectly. Using Trim is the standard and correct way to clean this column in Power Query.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Split Column
Why it's wrong here
Split Column divides a column into multiple columns based on a delimiter. It does not remove leading or trailing spaces; it would create additional columns and complicate the data model. This transformation is unrelated to the requirement of cleaning whitespace.
- ✗
Replace Values
Why it's wrong here
Replace Values can replace a specific text string, but replacing a space character would remove all spaces, including those between words in a name. This would corrupt names like 'John Smith' to 'JohnSmith'. It is not a safe way to remove only leading and trailing spaces.
- ✗
Clean
Why it's wrong here
The Clean transformation removes non-printable characters, such as control characters, from text values. It does not remove standard leading or trailing spaces. While useful for data from legacy systems, it does not address the specific requirement of trimming spaces from CustomerName.
- ✓
Trim
Why this is correct
The Trim transformation removes all leading and trailing whitespace from text values. Applying it to CustomerName cleans the data without altering internal spaces, which is exactly what is needed. This transformation is available in the Power Query Editor under the Transform tab and is applied to the selected column.
Go deeper
Related to this question
About these practice questions
One of 524 original PL-300 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Microsoft exam blueprint
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.