Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have an SQL query that returns two columns with multiple values and I need to format it into a key value from the first column with multiple columns made from the values in the second column. I've looked and tried various methods (including pivot/unpivot) in Excel, SQL and Power BI. I'm hoping someone here can point me in the right direction for one of those. Here is a sample of the data being returned:
What needs to happen is this:
There may be 1 WC or there may be up to 21 (I believe). The current report -done through another product - shows up to 5.
Solved! Go to Solution.
Check this out:
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Check this out:
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Wow, that is exactly what I need. Just I don't know how to add M Code to my file. I'm assuming it's in the Power Query.
Once you are in Power Query, you can go to the advanced editor. That is where the code is pasted
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
I thought so but hadn't tried it yet. Woot it worked! I would buy you the beverage of your choice if I could.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
71 | |
70 | |
43 | |
31 | |
26 |
User | Count |
---|---|
89 | |
49 | |
44 | |
38 | |
37 |