PL-300 Prepare the data Practice Question
You are preparing a Power BI dataset that includes a table 'Products' imported from an Excel workbook. The table has a column 'ProductCode' that contains values like 'A100', 'B200', etc. You need to create a new column that extracts the numeric part of the code (e.g., 100, 200) and uses it as an integer. Which Power Query transformation should you use?
⚠ Common exam trap
The trap here is assuming that a simple Replace Values or Split Column will work for all codes, when the prefixes can vary and are not known in advance.
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
✓
Add a Custom Column with the formula Text.Select([ProductCode], {"0".."9"}) and change the type to Whole Number.
Using Text.Select with a list of digits extracts only the numeric characters from the code, regardless of the letter prefix. This creates a text column that can then be converted to an integer. Other methods are either too specific to certain prefixes or extract the wrong portion. Text.Select is the most flexible and correct approach.
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 the Replace Values transformation to replace 'A' and 'B' with an empty string, then change the type.
Why it's wrong here
Replacing specific letters like 'A' and 'B' would require knowing all possible prefixes in advance. If new prefixes appear, the transformation fails. It is not a dynamic solution and would leave other letters intact, causing conversion errors. This approach is brittle and not recommended for varying data.
- ✗
Use the Extract transformation and select 'Text Before Delimiter'.
Why it's wrong here
Extract Text Before Delimiter would return the text before a delimiter, which is the opposite of what is needed. We need the numeric part after the letter prefix. This transformation would yield the letter portion, not the numbers. It does not meet the requirement.
- ✗
Use the Split Column transformation by delimiter 'A' and keep the second part.
Why it's wrong here
Splitting by 'A' would work only for codes starting with 'A'. For codes like 'B200', the split would not isolate the numeric part correctly. This method is not scalable and would produce incorrect results for other prefixes. It is not a reliable solution for varying patterns.
- ✓
Add a Custom Column with the formula Text.Select([ProductCode], {"0".."9"}) and change the type to Whole Number.
Why this is correct
Text.Select extracts only the characters specified in the list, in this case digits 0 through 9. This yields the numeric portion as text, which can then be converted to Whole Number. This approach is flexible and handles varying letter prefixes. It is a robust way to isolate numbers from alphanumeric strings.
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.