Pivot & Unpivot Transformation in Power BI

Convert rows into columns and columns into rows values transformation are quite easy in Power BI. To demonstrate these operations, I will use “Enter Data” feature to create data for this example.

Step 1: Click on “Enter Data” and enter the following data

Year Month Budget Amount
2018 M1 100
2018 M2 100
2018 M3 100
2018 M4 100
2018 M5 100
2018 M6 100
2018 M7 100
2018 M8 100
2018 M9 100
2018 M10 100
2018 M11 100
2018 M12 100
2018 M1 100

Step 2: After entering the data, click on “Edit Queries” to switch from Power view to Power Query.

Step 3: Select “Month” column by clicking on column header.

Step 4: Click on “Pivot Column” from “Transform” ribbon

Step 5: Currently the data has multiple row values for “M1”, choose “Sum” from “Advanced options” to sum both values. Choose “Budget Amount” for Values Column.

Step 6: Unpivot columns by selecting the required columns

Leave a Reply

Your email address will not be published. Required fields are marked *