Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
muhamazh
Frequent Visitor

Separating Delimited column with multiple delimiters

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

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@muhamazh 

can we create a new table in PQ to get this output? pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ryan_mayu
Super User
Super User

@muhamazh 

can we create a new table in PQ to get this output? pls see the attachment below





Did I answer your question? Mark my post as a solution!

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.