Bird
0
0

Which approach correctly achieves this?

hard📝 Scenario Q15 of 15
Power BI - Power Query Editor
You have a table with a "Category" column containing values: "Fruit", "fruit", "FRUIT", and "Vegetable". You want to replace all variations of "fruit" (case insensitive) with "Produce" using Power Query. Which approach correctly achieves this?
AUse Table.ReplaceValue with Replacer.ReplaceText and set case insensitive option
BAdd a custom column with Text.Lower and replace "fruit" with "Produce" there
CUse Table.ReplaceValue with Replacer.ReplaceText multiple times for each case variant
DUse Table.ReplaceValue with Replacer.ReplaceValue ignoring case automatically
Step-by-Step Solution
Solution:
  1. Step 1: Understand case sensitivity of ReplaceValue

    Table.ReplaceValue with Replacer.ReplaceText is case sensitive and does not have a built-in case insensitive option.
  2. Step 2: Replace all case variants

    Adding a custom column with Text.Lower converts all values to lowercase, allowing a single replace of "fruit" with "Produce" in that column.
  3. Step 3: Evaluate other options

    Using multiple ReplaceValue calls is inefficient and error-prone. No case insensitive flag exists for ReplaceValue. ReplaceValue does not ignore case automatically.
  4. Final Answer:

    Add a custom column with Text.Lower and replace "fruit" with "Produce" there -> Option B
  5. Quick Check:

    Use Text.Lower in custom column for case insensitive replace [OK]
Quick Trick: Use Text.Lower in custom column for case insensitive replace [OK]
Common Mistakes:
  • Expecting case insensitive replace by default
  • Trying to replace all cases in one call
  • Using wrong replacer or ignoring case

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Power BI Quizzes