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
RickL
Frequent Visitor

Split several columns at once into rows

I have a dataset with multiple concatenated fields and I need to split them into rows based on the delimiter (some cases a semicolon, others a comma). 

 

Report format (input)

IDAggregated_EthnicityAggregated_Ethnicity_Group
1New Zealand European/PakehaEuropean
2New Zealand European/Pakeha;New Zealand MaoriEuropean; Maori
3British/Irish;New Zealand European/PakehaEuropean
4Indian;New Zealand European/Pakeha;OtherAsian; European; Other

 

Output I want

IDAggregated_EthnicityAggregated_Ethnicity_Group
1New Zealand European/PakehaEuropean
2New Zealand European/PakehaEuropean
2New Zealand MaoriMaori
3British/IrishEuropean
3New Zealand European/PakehaEuropean
4IndianAsian
4New Zealand European/PakehaEuropean
4OtherOther
1 ACCEPTED SOLUTION
Anonymous
Not applicable

@RickL,

Add a cutsom column in your table.

if Text.Contains([Aggregated_Ethnicity], ";")=true and  Text.Contains([Aggregated_Ethnicity_Group], ";")=false then [Aggregated_Ethnicity_Group] &";"&[Aggregated_Ethnicity_Group]else [Aggregated_Ethnicity_Group]

1.PNG

Then duplicate your table, and split columns and merge tables. For more details, please review attached PBIX file.
1.PNG2.PNG

Regards,
Lydia

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@RickL,

Add a cutsom column in your table.

if Text.Contains([Aggregated_Ethnicity], ";")=true and  Text.Contains([Aggregated_Ethnicity_Group], ";")=false then [Aggregated_Ethnicity_Group] &";"&[Aggregated_Ethnicity_Group]else [Aggregated_Ethnicity_Group]

1.PNG

Then duplicate your table, and split columns and merge tables. For more details, please review attached PBIX file.
1.PNG2.PNG

Regards,
Lydia

Thanks Lydia

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors