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

M Power Query Lookup words from table

Hello,

 

I try to do the following in Power Query:

 

I have a dataset which contains a text column and an other table (lookup table) with a list of words (around 200). If the text from my dataset contains one or more words from the lookup table i want to add those words in a new column (comma seperated)

 

Below an example of how I would like to have it.

 

I hope someone can help me with this, thanks in advance!!

 

Regards, Tiemen

example.JPG

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous 

 

Please see attached file as well

 

Tieman.png


Regards
Zubair

Please try my custom visuals

View solution in original post

3 REPLIES 3
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous 

 

Please see attached file as well

 

Tieman.png


Regards
Zubair

Please try my custom visuals
Zubair_Muhammad
Community Champion
Community Champion

Hi @Anonymous 

 

See if this helps

 

First add a custom column

 

=Text.SplitAny([Text]," ?")

and then

Text.Combine(
List.Select([Custom], each List.Contains(Lookup[Words],_,Comparer.OrdinalIgnoreCase))
,
",")

Regards
Zubair

Please try my custom visuals
Anonymous
Not applicable

@Zubair_Muhammad  Thank you very much!! This works perfectly Smiley Very Happy

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.