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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

If Substring from a List contains Subtring, return that item from the list

I have a column containing broken/good domains

 
 
donkey_shrek_3-1675955225619.png


I want to compare it to a list containing all the correct domains, and return those from this list that partial matches with [Email Domain]

 
donkey_shrek_4-1675955246089.png
1 ACCEPTED SOLUTION

= Table.AddColumn(Test, "Random", each List.Select([Column1],each List.Contains(TheTableNameWhichEmailDomainComesFrom[Email Domain],_,(x,y)=>Text.Contains(y,x))))

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

donkey_shrek_0-1676012573779.png

It keeps giving this error. I always run into this field access issue in other projects too
I have tried assigning the column to a variable but to no avail.

= Table.AddColumn(Test, "Random", each let Column1 = [Column1] in List.Select(Column1,each List.Contains([Email Domain],_,(x,y)=>Text.Contains(y,x))))

 

Just to be clear [Column1] contains lists of the correct domains

donkey_shrek_1-1676012853326.pngdonkey_shrek_2-1676012862897.png


Thanks 🙂

= Table.AddColumn(Test, "Random", each List.Select([Column1],each List.Contains(TheTableNameWhichEmailDomainComesFrom[Email Domain],_,(x,y)=>Text.Contains(y,x))))
wdx223_Daniel
Super User
Super User

List.Select([Column1],each List.Contains([Email Domain],_,(x,y)=>Text.Contains(y,x)))

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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