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
kstiegler
Advocate I
Advocate I

SUMMARIZECOLUMNS from two tables where column B contains a string matching the text of column A

I have two columns in separate tables, Accounts[Services] and Services[Name], and I'm trying to create a new table where one column is a list of values from Accounts[Services] and the other column is the matching value from the Services[Name] column.  Both columns will have repeated values, but there should be only unique combinations when considering both columns. Example:

 

Services

Name
Car wash
Air tires
Change oil

 

Account

Services
Car wash|Air tires|Change oil
Car wash|Change oil
Change oil

 

Intended result

Services[Name]Account[Services]
Car washCar wash|Air tires|Change oil
Car washCar wash|Change oil
Air tiresCar wash|Air tires|Change oil
Change oilCar wash|Air tires|Change oil
Change oilCar wash|Change oil
Change oilChange oil

 

In the above table, rows from both Services[Name] and Account[Services] are duplicated, but there are only unique combinations when considering both column in any given row.

 

Using SUMMARIZECOLUMNS with both columns includes all results from both columns. I haven't been able to figure out how to correctly filter the results.

 

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
https://1drv.ms/u/s!AiUZ0Ws7G26RiWK1tVd3F5r5-hoP?e=7uhC2X

Screenshot_2.pngScreenshot_3.png

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

 

View solution in original post

5 REPLIES 5
Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
https://1drv.ms/u/s!AiUZ0Ws7G26RiWK1tVd3F5r5-hoP?e=7uhC2X

Screenshot_2.pngScreenshot_3.png

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

 

This is exactly what I needed, thank you!

 

I actually ended up solving it myself in Query Editor after it was suggested by another poster, but I may go back and use this DAX solution now.

Ashish_Mathur
Super User
Super User

Hi,

This should ideally be done in the Query Editor (not in DAX).  Would you be OK with that approach?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Yes, Query Editor could work. I was looking to do it in DAX because my Account[Services] column is currently a calculated column rather than a column defined in Query Editor.

Contradiction in your previous statement.  Don't know what approach you want to take.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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 Solution Authors
Top Kudoed Authors