Hi everyone,
I had an unpivoted table of the form:
ID Item Color
1 A red
1 B red
2 C red
2 D red
2 E red
I wanted to combine two rows into one depending on the ID and I was able to get the following output:
1 A,B red
2 C,D,E red
However, I only want unique pairs like A,B and not C,D,E. The C,D,E should be separated as C,D and C,E and D,E.
Can anyone help with this conversion?
P.S: I am doing this in dax and have to remain inside dax. No use of power query for it is possible. Best
Solved! Go to Solution.
can we create a new table in PQ to get this output? pls see the attachment below
Proud to be a Super User!
can we create a new table in PQ to get this output? pls see the attachment below
Proud to be a Super User!
Thanks for providing me with the solution. I have one last question.
I also have IDs that have singular values i.e not two or three different values. Like....
ID Item Color
1 F red
2 G red
3 H red
4 I red
5 J red
Is there a way to handle these values simultaneously alongside the pairs? Because the procedure takes out these singular values. Something that can create an F,F and H,H and J,J kinda combinations for singular values.
I found the solution to this too. I just created another table with non-duplicates and appended the two tables together as they all had different and unique ids, which made the append easier. Thank you so much
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
User | Count |
---|---|
207 | |
52 | |
43 | |
39 | |
39 |
User | Count |
---|---|
269 | |
210 | |
71 | |
70 | |
65 |