Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.