March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi all!
I have a table like such:
ID | Item | Color |
a123 | 001 | red |
a123 | 002 | blue |
b456 | 001 | blue |
c789 | 001 | red |
c789 | 002 | blue |
c789 | 003 | purple |
and I need it to be grouped, then "unpivoted" like so:
ID | Item1 | Color1 | Item2 | Color2 | Item3 | Color3 | Item4 | Color4 |
a123 | 001 | red | 002 | blue | null | null | null | null |
b456 | 001 | blue | null | null | null | null | null | null |
c789 | 001 | red | 002 | blue | 003 | purple | null | null |
How would I be able to do this?
edit: there's a similar question here https://community.powerbi.com/t5/Desktop/Group-by-a-column-with-expansion/m-p/504490#M235507 , but doesn't count for irregular item counts down the ID. would appreciate any and all help! 😉
Solved! Go to Solution.
I wonder whether a transformation of this type (second query in the file) is no longer useful.
But this can only be known by you depending on what you have to do next.
This solution can be simplified (see query ----2a)
I wonder whether a transformation of this type (second query in the file) is no longer useful.
But this can only be known by you depending on what you have to do next.
This solution can be simplified (see query ----2a)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
16 | |
13 | |
12 | |
9 |
User | Count |
---|---|
34 | |
31 | |
20 | |
19 | |
17 |