All Content
Timespan
explore our new search
2 *amazing* tricks about UNPIVOT in Power Query
Power BI
Apr 25, 2023 10:00 AM

2 *amazing* tricks about UNPIVOT in Power Query

by HubSite 365 about Chandoo

Data AnalyticsPower BIM365 Hot News

Unpivoting is an extremely valuable feature of Power Query. It can take report style data and turn it into usable tabular format.

Unpivoting is an extremely valuable feature of Power Query. It can take report style data and turn it into usable tabular format. In this video, let me introduce Unpivot with two practical examples.

Download the sample data file from here

https://chandoo.org/wp/wp-content/uploads/2023/04/unpivot-example.xlsx

What is Unpivoting?

Unpivoting is a data transformation process that involves turning columns of data into rows. In other words, it involves reorganizing a dataset so that each observation is represented as a single row, rather than multiple columns.

Unpivoting is often used in data analysis and business intelligence to make it easier to work with data in certain scenarios. For example, if you have a dataset where each column represents a different month of data, you may want to unpivot the data so that each row represents a single month. This can make it easier to calculate trends and perform other types of analysis.

In SQL, unpivoting can be achieved using the UNPIVOT operator. In other data analysis tools such as Excel, unpivoting can be achieved using the “Unpivot” function or by using the Power Query feature.

  1. Unpivot Other Columns: This trick allows you to quickly unpivot multiple columns of data in a single step. To do this, you'll need to select the columns you want to unpivot, right click, and select Unpivot Other Columns. This will convert the data into a single column, while keeping all of the data in the same row.
  1. Unpivot All Columns: This trick allows you to quickly unpivot all columns in a table in a single step. To do this, you'll need to select the table, right click, and select Unpivot All Columns. This will convert the data into a single column, while keeping all of the data in the same row.

Jul 20, 2017 — Jul 20, 2017Four Power Query Unpivot scenarios, so you can fix a range of poor layouts. Video instructions, plus download the workbook with step by step ...

Oct 7, 2022 — Oct 7, 2022I used to be amazed at people who could use complex formulas. I picked up lots of tips and tricks by learning these advanced techniques. But I ...

Unpivot columns · To open a query, locate one previously loaded from the Power Query Editor, select a cell in the data, and then select Query > Edit. For more ...

Jun 24, 2022 — Jun 24, 2022In the "Query Editor," right-click on the first column and click "Unpivot Other Columns." This unpivots the data in your other columns within ...

To unpivot the data, select all the numerical columns you wish to unpivot. Generally, you will not select the first column in table. To select multiple adjacent ...

Jan 20, 2021 — Jan 20, 2021Use either Shift or Ctrl key to select multiple columns at once. Click Unpivot Columns in Transform; Power Query automatically populates all ...