Unpivoting and pivoting columns
You may need to change how data is displayed and turn a selected row into a column or vice versa. You may also need to create a new matrix view that can be easily used while developing reporting and custom views on data. In this recipe, we will see how to leverage pivot and unpivot features that allow us to respectively turn rows to columns or to transform columns into rows.
Getting ready
For this recipe, you need to have Power BI Desktop running on your machine. You need to download the following file in a local folder:
FactInternetSales
CSV file
In this example, we will refer to the C:\Data
folder.
How to do it
Once you open your Power BI Desktop application, you are ready to perform the following steps:
- Click on Get Data and select the Text/CSV connector.
- Browse to your local folder where you downloaded the
FactInternetSales
CSV file and open it. A window with a preview of the data will pop up...