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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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

View solution in original post

3 REPLIES 3
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous 

 

Please see attached file as well

 

Tieman.png

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))
,
",")
Anonymous
Not applicable

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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