Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hello dear problem squashers,
I have to solve this situation where I have a classic database with as many rows as yearly situations per registration number. In order to be able to use it with Word for a mailing project, I need to fully pivot it to output a database with one line per registration number.
I have this:
And I need this:
I was able to do it in Excel with INDEX/MATCH, but it was slow and not ergonomic. And anyway, I want to fully automatize it.
When I try to pivot based on the year column in Power Query, it deletes it and does output a lot of null values:
You can find the database (with obviously fake data) via this link.
Thanks in advance for any help!
Solved! Go to Solution.
First, unpivot all except the first two columns.
Merge the Year and Attribute into a single column
Then pivot the merged column to get the desired result.
I don't have any comment, except that it works flawlessly.
Thank you so much!
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 11 | |
| 4 | |
| 4 | |
| 4 |