Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello Friends,
PowerBI newbie coming over from Tableau, hoping you might help me with a problem. I am trying to reshape economic data, which comes in horizontal form. The country and metric in a rows and years in the column.
I need to get it into long form, to make it easier to use in PowerBI. That puts the country and year in rows with the metrics in columns.
When I go to unpivot the data, something is wrong. I would be deeply appreciative if anyone has experience with this.
Thank you!!
Michael
Solved! Go to Solution.
Welcome to Power BI!
First thing you need to do is unpivot your data. There are a few ways, but for this type of data where 2026 would bring a new column....
1. Select your Country and Metric columns (hold ctrl to select multiple columns) and under the Transform tab > (find arrow on) Unpivot columns > Unpivot Other Columns
data should look like this
2. Select your metric column and pivot this column. A dialog box will ask you which column has your values and just select your newly created values column from the previous step.
3. Enjoy the new data structure!
Quick note: The reason you use the unpivot other columns as the first step is that your unpivot only cares that 'Country' and 'Metric' exist. It will unpivot every other column even if another year gets added. You COULD select all the year columns and ask it to unpivot those specifically but when a new year gets added you will need to come back in and adjust it.
Thank you so much, especially for the tip on unpivoting other columns. That's so helpful. Thank you!
Welcome to Power BI!
First thing you need to do is unpivot your data. There are a few ways, but for this type of data where 2026 would bring a new column....
1. Select your Country and Metric columns (hold ctrl to select multiple columns) and under the Transform tab > (find arrow on) Unpivot columns > Unpivot Other Columns
data should look like this
2. Select your metric column and pivot this column. A dialog box will ask you which column has your values and just select your newly created values column from the previous step.
3. Enjoy the new data structure!
Quick note: The reason you use the unpivot other columns as the first step is that your unpivot only cares that 'Country' and 'Metric' exist. It will unpivot every other column even if another year gets added. You COULD select all the year columns and ask it to unpivot those specifically but when a new year gets added you will need to come back in and adjust it.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
76 | |
59 | |
35 | |
33 |
User | Count |
---|---|
100 | |
62 | |
56 | |
47 | |
41 |