cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PK316 Frequent Visitor
Frequent Visitor

How to return the actual value found in a text search

Hi,

 

I have a column A that contains sentences. In column B, I want to search for particular words in Column A. if a particular word is found in Column A, then I want to return the value that was found, rather than a true/ false value, or the starting position number of the word found. I have looked at text.contains in the M language, and in DAX, have looked at SEARCH, RELATED, MID etc. but nothing seems to give me what I wanted.

 

Any help would be appreciated.

 

Thanks,

Patricia

3 REPLIES 3
Drors Member
Member

Re: How to return the actual value found in a text search

The search formula work fine to me:

1.PNG

Community Support Team
Community Support Team

Re: How to return the actual value found in a text search

Hi @PK316,

 

By my test, you could create a calculated column with the formula below.

 

check =
IF ( FIND ( "you", 'Sheet14'[Text],, 0 ) <> 0, "you", BLANK () )

Then you could get the output below.

 

Capture.PNG

 

Hope it can help you!

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PK316 Frequent Visitor
Frequent Visitor

Re: How to return the actual value found in a text search

Thank you for this response. The problem is that I have a list of search terms that I want to use, and dependent on the search term found, the value for to be returned if true will be different thus needs to be read from a list also and not hardcoded.

Helpful resources

Announcements
Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 121 members 1,651 guests