In Power Query, you can transform selected columns into attribute-value pairs where columns become rows. You unpivot columns in the Query Editor.
Learn more about the Query Editor
You can access the Query Editor from the Navigator pane when connecting to a data source, or at any time from the Workbook Queries pane or the contextual Query ribbon tab for an existing query. To learn how to load the Query Editor, see Power Query Quick Start.
To Unpivot columns
- Select one or more columns.
Using the Query Editor ribbon
- In the Query Editor ribbon, click Unpivot Columns.
Using the Query Editor context menu
- Right-click the selected columns, and click Unpivot Columns.
Unpivot Columns creates an Attribute column for each selected column heading and a Value column for each selected column cell value. The attribute-value pair columns are inserted after the last column. In the example above, each date column becomes a row with an Attribute column containing the date value and a Value column containing the date column value. If you add an additional date column to the original source table, Power Query adds an additional row to the Unpivot table.
Top of Page