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.
Hi,
I would like to perform a data transformation in Power Query with the pivot function.
Below is an example of what I want to achieve.
ORIGINAL DATA
FINAL DATA I WANT TO GET
column3 = unique key that I want to retain in the table without duplicates
column4 = attribute column that I want to "pivot" from rows into several new columns as header
column 5 & 6 = value column from the original unpivoted column and distributed as values to the corresponding new columns
I have already tested the pivot function in Power Query but that seems not work with multiple value columns (column 5 & 6).
Anyone can suggest how to achieve the above result in Power Query?
Thanks!
Best regards,
Emily
Solved! Go to Solution.
@Anonymous
Please check the attached file below my signature and let me know if it works as expected.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Fowmy Many thanks for sharing the sample solution file!
I've tested it in my real business report and fine-tune some of the M codings based on business requirement, it works well with the expected result.
Thank you so much for your quick reply and have a great day!
Best regards,
Emily
@Anonymous
Please check the attached file below my signature and let me know if it works as expected.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Fowmy Many thanks for sharing the sample solution file!
I've tested it in my real business report and fine-tune some of the M codings based on business requirement, it works well with the expected result.
Thank you so much for your quick reply and have a great day!
Best regards,
Emily
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 |
---|---|
14 | |
13 | |
8 | |
8 | |
7 |
User | Count |
---|---|
17 | |
13 | |
7 | |
6 | |
6 |