Pivot and unpivot transformation in power bi

Pivot and unpivot are common data transformation techniques used in Power BI to convert rows into columns (pivot) or columns into rows (unpivot) in a table. These transformations are useful for summarizing data and making it easier to analyze. Here’s how to pivot and unpivot data in Power BI:

Pivot:

  1. Select the table that you want to pivot.
  2. Click on the column that you want to use as the pivot column to select it.
  3. In the “Transform Data” tab, click on the “Pivot Column” button.
  4. In the “Advanced options” section, select the column that you want to use as the values column.
  5. Enter a name for the new column that will contain the pivot values.
  6. Click “OK” to pivot the table.

Unpivot:

  1. Select the table that you want to unpivot.
  2. In the “Transform Data” tab, click on the “Unpivot Columns” button.
  3. Select the columns that you want to unpivot.
  4. Click “OK” to unpivot the table.

Once you’ve pivoted or unpivoted your data, you may need to make additional adjustments, such as renaming columns or applying other transformations. When you’re finished, be sure to click “Close & Apply” to save your changes to the data model.

spot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here