<?xml version="1.0" encoding="UTF-8"?><oembed><type>video</type><version>1.0</version><html>&lt;iframe src=&quot;https://www.loom.com/embed/a9a5d168a9124aedb5f8f3a4ec8b5694&quot; frameborder=&quot;0&quot; width=&quot;1920&quot; height=&quot;1440&quot; webkitallowfullscreen mozallowfullscreen allowfullscreen&gt;&lt;/iframe&gt;</html><height>1440</height><width>1920</width><provider_name>Loom</provider_name><provider_url>https://www.loom.com</provider_url><thumbnail_height>1440</thumbnail_height><thumbnail_width>1920</thumbnail_width><thumbnail_url>https://cdn.loom.com/sessions/thumbnails/a9a5d168a9124aedb5f8f3a4ec8b5694-3a69c214050441a1.gif</thumbnail_url><duration>185.966</duration><title>Unpivoting a Table Tutorial using Power Query in Excel📊</title><description>In this tutorial, I demonstrate how to unpivot a table using an example dataset from Seminario, Zegarra and Palomino (2019). The dataset includes variables like population by region, GDP per capita, and more. I show the process of transforming the pivoted data into an unpivoted version, simplifying it to have one column for the year and one for the variable. No specific action is requested from viewers, just a walkthrough of the unpivoting process. The following  steps were provided by GPT on the base of the Transcript generated by Loom.

### Steps to Unpivot the Table:

1. **Understand the Data**:
   - You started by explaining that the data is currently in a pivoted form, where different variables (e.g., population by region, GDP per capita, etc.) are spread across columns.

2. **Goal**:
   - The objective was to transform this pivoted data into an **unpivoted** version. In this format, you would have a single column for the year and another column for the variable (e.g., GDP percentage).

3. **Select the Data**:
   - You selected the entire table that you wanted to unpivot.

4. **Open Power Query**:
   - After selecting the table, you navigated to the **Data** tab in Excel and chose the option to load the data from a **range/table** into **Power Query**.

5. **Change Data Types (if needed)**:
   - In Power Query, you modified the data type of certain columns. For instance, you changed the `Ubigeo` (region code) column from a number to text.

6. **Select Columns to Keep**:
   - You selected the columns that you **did not** want to unpivot, such as `Ubigeo`, `Region`, and other identifiers that should remain as is.

7. **Unpivot the Data**:
   - You went to the **Transform** tab in Power Query and chose **Unpivot Other Columns** to unpivot the remaining columns (those with the years).

8. **Review the Result**:
   - The data was unpivoted immediately without needing to write any code. You mentioned that this was straightforward and that you could now see the desired format.

9. **Close and Load**:
   - After reviewing the transformation, you navigated to **Close &amp; Load** to exit Power Query and load the unpivoted data back into Excel.

10. **Review the Output**:
    - The resulting table had one column for the **year** and another column for the **value** (e.g., GDP percentage). You mentioned that you would apply this process to all the variables.</description></oembed>