PL-300 Prepare the data Practice Question
Exhibit
Refer to the exhibit.
```
let
Source = Csv.Document(File.Contents("C:\data\sales.csv"),[Delimiter=",", Columns=5, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"OrderDate", type datetime}, {"Amount", type number}})
in
#"Changed Type"
```You are debugging a Power Query that imports a CSV file. The exhibit shows the M code. The CSV file contains a header row and data. Some rows have a comma inside a quoted field (e.g., "Smith, John"). What issue will arise from this code?
⚠ Common exam trap
Test-takers frequently assume the issue is with encoding or column count, but the core problem is the misuse of `QuoteStyle.None` instead of `QuoteStyle.Csv`, which directly causes quoted commas to be misinterpreted as delimiters.
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
✓
The QuoteStyle.None option will cause commas inside quotes to be treated as delimiters.
The M code uses `QuoteStyle.None`, which tells Power Query to treat commas inside quoted fields as column delimiters rather than as part of the field value. This causes rows with values like "Smith, John" to be split incorrectly, resulting in extra columns and misaligned data. The correct option for CSV files with quoted fields is `QuoteStyle.Csv`, which respects the standard CSV quoting rules.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The encoding 1252 is incorrect for the file.
Why it's wrong here
Windows-1252 (also known as ANSI) is a widely used encoding for Western European text and is a common output of Excel's CSV export. Since CSV files are plain text, encoding only affects how non-ASCII bytes are interpreted; if the file contains mostly ASCII, any superset encoding like 1252 will decode it correctly. The reported problem involves commas inside quoted values, which is a parsing/delimiter issue, not a character decoding issue. Therefore, blaming the encoding is not the correct diagnosis.
- ✓
The QuoteStyle.None option will cause commas inside quotes to be treated as delimiters.
Why this is correct
Setting QuoteStyle.None tells the CSV parser to ignore the special meaning of double quotes, so it treats every comma as a field separator, even those that are inside a quoted string. For example, a line like "John, Doe" would become two columns instead of one, causing column count mismatches and data shifting. This is exactly the kind of symptom that would appear when debugging an import. The fix is to use QuoteStyle.Csv (or another style) so the parser honors quoted fields and keeps embedded commas as part of the same value.
- ✗
The number of columns specified (5) is too many.
Why it's wrong here
Specifying an expected number of columns (e.g., 5) in Power Query does not cause a parsing error; it only influences how the data is split if you use an explicit column count rather than the default delimiter-based split. If the file actually has a different number of columns, you might see extra or missing columns, but that is a consequence of the delimiter interpretation, not a cause. The column count option is a user-defined expectation, and the real problem is the QuoteStyle setting that creates more columns than intended. Thus, the number 5 is not 'too many' in itself; it's just a symptom of incorrect quoting.
- ✗
The Promoted Headers step will fail because the first row contains quotes.
Why it's wrong here
The Promoted Headers step simply takes the first row of the table as column names and renames the columns accordingly; it does not parse or interpret the data in that row. Even if the first row contains quotes or commas, the step will still work as long as the row was split correctly by the previous parsing steps. If the parsing is wrong (because of QuoteStyle.None), the header row itself may be split into too many columns, but that is not a failure of the Promoted Headers step; it will still promote whichever cells are in the first row. Therefore, the step will not fail solely because the first row contains quotes.
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 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.