Courseiva
Prepare the dataeasyMultiple ChoiceObjective-mapped

PL-300 Prepare the data Practice Question

You are transforming data in Power Query. A column named 'SalesAmount' contains values as text with a dollar sign and thousands separator, e.g., "$1,234.56". You need to convert this column to a decimal number for analysis. What is the most efficient sequence of transformations?

⚠ Common exam trap

Test-takers frequently assume Power Query's automatic type detection or direct data type change can handle currency symbols and separators, but in reality, it requires explicit cleaning steps to avoid errors or incorrect conversions.

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 Values to remove '$' and ',', then change data type to Decimal Number.

It explicitly removes both the dollar sign and the comma using Replace Values before changing the data type to Decimal Number, ensuring proper conversion without errors. Option A is inefficient; splitting the column is unnecessary when simple replacements work. Option B would fail because Power Query cannot automatically parse currency symbols and thousands separators from text when changing data type directly. Option D appears similar but specifies 'Decimal' instead of 'Decimal Number', which is not a valid data type in Power Query, leading to an error or incorrect result.

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 the column by delimiter and keep the numeric part, then change data type.

    Why it's wrong here

    Splitting the column by a delimiter assumes a single, consistent separator and a fixed part to extract. Currency values like '$1,234.56' contain both a dollar sign and thousands separators, so splitting on either one leaves remaining symbols or produces extra columns, and values without commas or with negative signs break the logic. This approach is overly fragile and can silently lose data, so it is not a reliable cleaning step before conversion.

  • Change data type to Decimal Number directly; Power Query will automatically clean the values.

    Why it's wrong here

    Changing the data type directly does not invoke any built-in text-cleaning logic; Power Query's type conversion expects a string that already resembles a number. When a value such as '$1,234.56' is converted, the engine raises DataFormat.Error: Could not convert because the dollar sign and commas are not valid numeric characters in M. The data must be sanitized first, so this option cannot produce a Decimal Number column.

  • Use Replace Values to remove '$' and ',', then change data type to Decimal Number.

    Why this is correct

    Removing specific characters is a direct and efficient method; however, a more robust approach is to use Text.Select to keep only digits and the decimal point, but Replace Values is simplest given the known characters.

  • Use Replace Values to remove '$' and ',' then change data type to Decimal.

    Why it's wrong here

    The replacement sequence itself is the right idea for removing '$' and ',' before conversion, but the final type name is invalid: Power Query exposes 'Decimal Number' as the friendly type, not 'Decimal'. In M, an explicit type would be `Decimal.Type` or `type number`, and the UI accepts 'Decimal Number'. Using an unrecognized type name causes an expression error, so the step cannot succeed.

About these practice questions

One of 217 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 →

How Courseiva writes practice questions · Editorial policy

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.