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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
dblank1974
Regular Visitor

Need help to Remove duplicate duplicate in same cells leaving distinct values

I am new to power BI and the M code.  I need help removing duplicates within a cell but keeping the distinct values.  Below is the sample table I am trying this on.  I already grouped on a single column and extracted the data I wanted;

 

Snip 1.png

 

As you can see from the highlights I only want one test 3 in each of these examples.  Below is the code I am trying with the advanced editor;

 

Code.png

 

There are no syntax errors but when I run it I get the following error

 

Code_error.png

 

What am I doing wrong?  Any pointers would be greatly appreciated.

1 ACCEPTED SOLUTION
dblank1974
Regular Visitor

well, I guess it only took me to spell out my problem on this forum to see where I was messing up.  I soolved my own problem.  Below was the correct code if anyone is interested.  The highlight is what  changed.

 

fix action.png

View solution in original post

2 REPLIES 2
rashidkhanrk06
Regular Visitor

Hello there

You should try this 

Table.TransformColumns( Source , {"Plugin Name", each Text.Combine(List.Distinct( Text.Split(_, ",")), ",")})

dblank1974
Regular Visitor

well, I guess it only took me to spell out my problem on this forum to see where I was messing up.  I soolved my own problem.  Below was the correct code if anyone is interested.  The highlight is what  changed.

 

fix action.png

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors