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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JimSales81
Helper I
Helper I

How to Split and combine 2 rows into 1 row with comma

Hello,


I have a Dimension table with accounts and affiliations.  The problem is i have multiple affiliations per account so when i link it to my customer table i can't filter easily from it.  

 

What i have:

AccountAffiliation
123McDonalds
123BK
345McDonalds
345

KFC

777None
828Panera

 

What i want to create with Power Query

 

AccountAffiliation
123McDonalds, BK
345

McDonalds, KFC

777None
828Panera

 

Then filter by Affiliation.  If i select McDonalds I'll get accounts 123 and 345,

if filter by

BK-Account 123

KFC-Account 345

Panera- Account 828

None- Account 777 

 

Any help would be great.

1 ACCEPTED SOLUTION
mlsx4
Memorable Member
Memorable Member

HI @JimSales81 

 

In Power Query you can combine by doing this:

Table.Group(#"Tipo cambiado", {"Account"}, {{"Affil", each Text.Combine([Affiliation],", "), type nullable text}})

 To filter, I would try with Text filter (https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104381309)

View solution in original post

1 REPLY 1
mlsx4
Memorable Member
Memorable Member

HI @JimSales81 

 

In Power Query you can combine by doing this:

Table.Group(#"Tipo cambiado", {"Account"}, {{"Affil", each Text.Combine([Affiliation],", "), type nullable text}})

 To filter, I would try with Text filter (https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104381309)

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.