Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register 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)
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 |
---|---|
16 | |
10 | |
10 | |
8 | |
7 |