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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
donkeyeminence
New Member

How to match inputs to a list of category Power Query

donkeyeminence_0-1676449907446.png

 

 


Column A are all the different types of inputs that could be related to a particular category.

How can I do it in such a way that my output becomes something like this?

donkeyeminence_0-1676449960121.png

 

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

NewStep=let a=Table.ToList(Table2,each {Text.Split(_{0},","),_{1}}) in Table.AddColumn(Table1,each Text.Combine(List.Zip(List.Select(a,(x)=>List.Contains(x{0},[Others],(x,y)=>Text.Contains(y,x)))){1},","))

View solution in original post

2 REPLIES 2
wdx223_Daniel
Super User
Super User

NewStep=let a=Table.ToList(Table2,each {Text.Split(_{0},","),_{1}}) in Table.AddColumn(Table1,each Text.Combine(List.Zip(List.Select(a,(x)=>List.Contains(x{0},[Others],(x,y)=>Text.Contains(y,x)))){1},","))

oh my goodness, it works thank you so much! Could you explain how the code works? 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors