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

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.

Reply
Anonymous
Not applicable

How to pick up one exact string among many in same cell

FactoryProductResult
AsiaProduct A, Product AB, Product ABC, Product ABCDProduct AB
EuropeProduct AB, Product ABCDProduct AB
NAProduct ABC, Product ABCDnull

Hello,

Just wondering is this trivial issue, but I need to pick up exact string from one cell.

The result that I want in this example is in column Result - looking for Product AB from Product column.

What is the easiest way to do this ? With Conditional Column I can't do this.

Thanks. 

2 REPLIES 2
Anonymous
Not applicable

The best way to tackle this, though, would be to use the split-on-delimiter functionality in Power Query so that each product is on its own line. Then it's really trivial to find the rows where the string you want is embedded.
Anonymous
Not applicable

What does it mean you can't do this with a conditional column? Do you want to have a calculated column in a model table? If so, then it's easy. Use the function that will return True if the string in Product contains the string you want and False otherwise. Then use If(...) to turn True into the string of your choosing. That's rather simple, isn't it? This is the function to use: https://docs.microsoft.com/en-us/dax/containsstring-function-dax

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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