Bird
0
0

You have a column "Status" with values "Open", "Closed", and "Pending". You want to replace "Open" with "Started" and "Closed" with "Finished" in a single Power Query step. Which method is best?

hard📝 Scenario Q8 of 15
Power BI - Power Query Editor
You have a column "Status" with values "Open", "Closed", and "Pending". You want to replace "Open" with "Started" and "Closed" with "Finished" in a single Power Query step. Which method is best?
AUse nested Table.ReplaceValue calls, one for each replacement
BUse a single Table.ReplaceValue with a list of old and new values
CCreate a mapping table and merge it with the original table
DUse Table.TransformColumns with a custom function to replace values
Step-by-Step Solution
Solution:
  1. Step 1: Understand limitations of Table.ReplaceValue

    Table.ReplaceValue replaces one value at a time; multiple replacements require multiple calls.
  2. Step 2: Efficient approach

    Using Table.TransformColumns with a custom function allows multiple replacements in one step.
  3. Final Answer:

    Use Table.TransformColumns with a custom function to replace values -> Option D
  4. Quick Check:

    Custom functions handle multiple replacements efficiently [OK]
Quick Trick: Use TransformColumns with function for multiple replacements [OK]
Common Mistakes:
  • Trying to replace multiple values in one Table.ReplaceValue call
  • Not using a mapping table when appropriate
  • Ignoring custom functions for complex replacements

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Power BI Quizzes