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.UnpivotOtherColumns(Source, {"Product"}, "Month", "Sales")Typical UI steps
- Select the columns that should stay as identifiers.
- Choose Unpivot Other Columns.
- Rename Attribute and Value columns.
- Set data types.
- Load the tidy table.
5 practical examples
Use Table.UnpivotOtherColumns in a sales report
This example shows how to use Table.UnpivotOtherColumns when preparing a sales report.
Table.UnpivotOtherColumns(Source, {"Product"}, "Month", "Sales")Use this pattern when the sales report needs a repeatable transformation instead of manual cleanup.
Use Table.UnpivotOtherColumns in a customer list
This example shows how to use Table.UnpivotOtherColumns when preparing a customer list.
Table.UnpivotOtherColumns(CleanSource, {"Product"}, "Month", "Amount")Use this pattern when the customer list needs a repeatable transformation instead of manual cleanup.
Use Table.UnpivotOtherColumns in a inventory export
This example shows how to use Table.UnpivotOtherColumns when preparing a inventory export.
Table.UnpivotOtherColumns(Inventory, {"Product"}, "Month", "Units")Use this pattern when the inventory export needs a repeatable transformation instead of manual cleanup.
Use Table.UnpivotOtherColumns in a monthly dashboard
This example shows how to use Table.UnpivotOtherColumns when preparing a monthly dashboard.
Table.UnpivotOtherColumns(ReportData, {"Product"}, "Month", "Revenue")Use this pattern when the monthly dashboard needs a repeatable transformation instead of manual cleanup.
Use Table.UnpivotOtherColumns in a operations tracker
This example shows how to use Table.UnpivotOtherColumns when preparing a operations tracker.
Table.UnpivotOtherColumns(Tracker, {"Product"}, "Month", "Hours")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 Table.UnpivotOtherColumns in Power Query?
Use Table.UnpivotOtherColumns when the transformation should be repeatable every time the data refreshes.
Can I do Table.UnpivotOtherColumns 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.