When to use this Power Query pattern
Use this pattern when the same data preparation step needs to happen every time a file, table or report refreshes.
Syntax or pattern
Table.ReplaceValue(Source, "N/A", null, Replacer.ReplaceValue, {"Status"})Typical UI steps
- Open Power Query Editor.
- Select the relevant column or query.
- Apply the transformation from the ribbon or formula bar.
- Review the generated step.
- Check data types and row counts before loading.
5 practical examples
Use Replace values in a sales report
This example shows how to use Replace values when preparing a sales report.
Table.ReplaceValue(Source, "N/A", null, Replacer.ReplaceValue, {"Status"})Use this pattern when the sales report needs a repeatable transformation instead of manual cleanup.
Use Replace values in a customer list
This example shows how to use Replace values when preparing a customer list.
Table.ReplaceValue(CleanSource, "N/A", null, Replacer.ReplaceValue, {"Status"})Use this pattern when the customer list needs a repeatable transformation instead of manual cleanup.
Use Replace values in a inventory export
This example shows how to use Replace values when preparing a inventory export.
Table.ReplaceValue(Inventory, "N/A", null, Replacer.ReplaceValue, {"Status"})Use this pattern when the inventory export needs a repeatable transformation instead of manual cleanup.
Use Replace values in a monthly dashboard
This example shows how to use Replace values when preparing a monthly dashboard.
Table.ReplaceValue(ReportData, "N/A", null, Replacer.ReplaceValue, {"Status"})Use this pattern when the monthly dashboard needs a repeatable transformation instead of manual cleanup.
Use Replace values in a operations tracker
This example shows how to use Replace values when preparing a operations tracker.
Table.ReplaceValue(Tracker, "N/A", null, Replacer.ReplaceValue, {"Stage"})Use this pattern when the operations tracker needs a repeatable transformation instead of manual cleanup.
Common mistakes to avoid
- Applying steps in an order that makes later cleaning harder.
- Forgetting that step names are referenced by later M code.
- Not checking row counts before and after transformations.
FAQ
When should I use Replace values in Power Query?
Use Replace values when the transformation should be repeatable every time the data refreshes.
Can I do Replace values from the Power Query interface?
Usually yes. The interface creates the M code for many common transformations, and you can adjust it in the formula bar or Advanced Editor.
Should I edit the M code manually?
Edit M manually when the interface cannot express the pattern clearly, or when you need reusable logic, parameters or cleaner step names.