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
sharpedogs
Advocate II
Advocate II

Merge or Group Columns?

Hi, 

I have the below dataset, I essentially want to flatten the dataset so that instead of having multiple lines showing each AD Group Chad and David have, I want to merge the AD Groups so that the end result is a column with Chad and a column with (Office, Exchange).

 

User

AD GROUP  

CHAD

OFFICE  
CHADEXCHANGE  
DAVID OFFICE  
DAVID POWERBI  
    

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

try following these step:

 

having loaded your table, select group by function:

image.png

 

and edit and pick the field, so that have this situation:

 

image.png

 

you get this table with error. You have then edit and correct the formula in the bar-formula:

changint List.Sum([AD_GROUP]) with Text.Combine([AD_GROUP],","):

 

image.png

after edited click enter. You should get this table athis poitn:

 

image.png

View solution in original post

v-eachen-msft
Community Support
Community Support

Hi @sharpedogs ,

 

You could use "pivot" function with Text.Combine() to get the result. Then unpivot these columns to get final result.

1-1.PNG 

Here is my test file for your reference.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

4 REPLIES 4
v-eachen-msft
Community Support
Community Support

Hi @sharpedogs ,

 

You could use "pivot" function with Text.Combine() to get the result. Then unpivot these columns to get final result.

1-1.PNG 

Here is my test file for your reference.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Anonymous
Not applicable

#"Grouped Rows" = Table.Group(#"Changed Type", {"User"}, {{"list_ad", each _[AD GROUP]}}),
#"Extracted Values" = Table.TransformColumns(#"Grouped Rows", {"list_ad", each Text.Combine(List.Transform(_, Text.From), ","), type text})
in
#"Extracted Values"

 

image.png

I appriciate the reply, but your level of PowerBi is way beyond my understanding :)....  I'm not sure where I start to enter your resolution? Is it an Add Column? Are you able to lay it out in more detailed steps?

Anonymous
Not applicable

try following these step:

 

having loaded your table, select group by function:

image.png

 

and edit and pick the field, so that have this situation:

 

image.png

 

you get this table with error. You have then edit and correct the formula in the bar-formula:

changint List.Sum([AD_GROUP]) with Text.Combine([AD_GROUP],","):

 

image.png

after edited click enter. You should get this table athis poitn:

 

image.png

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.