From the course: Power BI Data Methods

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Pivoting and unpivoting data

Pivoting and unpivoting data - Power BI Tutorial

From the course: Power BI Data Methods

Pivoting and unpivoting data

- [Instructor] Let's say that we have a table of data that we're looking to summarize. It has Year, Category, and Revenue as three individual fields. We can create a PivotTable to summarize the total sales by category in the rows and the year in the columns. Notice how much easier it is to read this way. Pivoting is different from grouping because it enables us to put a field as the column header names while grouping aggregates based on the rows. Although we can have multiple aggregations even of the same fields in the rows too. Unpivoting the data reverses this pivot aggregation, but it's not the same thing as the original data table. For example, when we pivot our data table, we keep the revenue aggregations because we lost this granularity when we originally pivoted it. In our daily weather data for Santa Barbara, let's remove the columns we don't need, so we only have three of them. This leaves us with the Date column, the Datatype, and the Temperatures. It's helpful to remove…

Contents