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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
nsexton12
Resolver I
Resolver I

Remove Duplicate Values from Calculated Column Result

I have a calculated column that is using the values in a response column, searching it for keywords, and returning the values associated with those keywords from another table. The problem I am running into is that there are duplicates because there is overlap between keywords. For example: 

 

 Problem
car emissions through use of fossil fuels are harming the environment

 

 

KeywordSolution
car emissionsuse less cars
fossil fuelsuse less cars

 

 

I am using the function in a calculated column in the problem table. 

CONCATENATEX('Solutions Table',IF(SEARCH('Solutions Table'[Keyword],'Problem Table'[Problem],,999) <> 999,'Solutions Table'[Solution] &"; ",""))
 
This works great until I have an example like above. I would like it to only return "use less cars" instead of "use less cars; use less cars". I have tried everything I know how to do to get the duplicates to go away but cannot find any solution. Could someone please help me out? 
 

 

 

1 REPLY 1
ryan_mayu
Super User
Super User

@nsexton12 

maybe you can try this in PQ. However, we still need to text.combine if one problem has different solutions.





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

Proud to be a Super User!




Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.