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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
jamiers
Helper I
Helper I

Grouping Rows and Still Showing Multiple Non-Grouped Cells

OK -- I have something screwy going on and it is just because of lack of knowledge - plain and simple.  I have the following line:

 

 

Table.Group(#"Buffer Table", {"account_id","Name (link)","Member #","Position Name.1","Position Name.2","Start Date","Email","First Name","Preferred Name","Last Name","T","account_id text","ProfileLink","MC Pos","GAP-RES/DDO.GAP RES/ DDO/"}, {{"All MC Pos", each Text.Combine([MCPos],"
"), type nullable text}})

 

 

I want to group the rows that have the same account_id... and COMBINE the MCPos field, but keep all the other fields that are listed after "account_id" and before "GAP-RES/DDO.GAP RES/ DDO/"

 

This is clearly wrong.... because it isn't grouping so... how can I group rows that have the same "account_id", combine the MCPos field of those rows, but keep all the other cells because I need that information in the table.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jamiers ,

 

Here's my final outcome.

23.png

 

And below are my steps.

1.Group by account_id and add a column to keep all rows.

vstephenmsft_0-1692086223978.png

2.Add an index column.

vstephenmsft_1-1692086266580.png

3.Add a column contains All MC Pos values.

vstephenmsft_2-1692086292278.png

4.Extract values from list as follows.

vstephenmsft_3-1692086335529.png

5.Expand the "AddIndexColumn", you will get the following. Filter out the Index 2 to get the final outcome.

vstephenmsft_4-1692086404926.png

vstephenmsft_5-1692086453794.png

 

 

Reference:

How to merge different rows with the same attribut... - Microsoft Fabric Community

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @jamiers ,

 

Here's my final outcome.

23.png

 

And below are my steps.

1.Group by account_id and add a column to keep all rows.

vstephenmsft_0-1692086223978.png

2.Add an index column.

vstephenmsft_1-1692086266580.png

3.Add a column contains All MC Pos values.

vstephenmsft_2-1692086292278.png

4.Extract values from list as follows.

vstephenmsft_3-1692086335529.png

5.Expand the "AddIndexColumn", you will get the following. Filter out the Index 2 to get the final outcome.

vstephenmsft_4-1692086404926.png

vstephenmsft_5-1692086453794.png

 

 

Reference:

How to merge different rows with the same attribut... - Microsoft Fabric Community

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

ToddChitt
Super User
Super User

So if I understand you correclty, in your result set, you want ONE row for ID 43222(Adams, John) and a column that combines TWO rows of data into one cell, separated by a carriage return.

Not for nothing, but how did you decide that column E should be "New London"?

 




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





jamiers
Helper I
Helper I

data

 

Here is a Excel One Drive file with sample data.

ToddChitt
Super User
Super User

Instead of pasting code, can you give us an example of the data as it looks BEFORE you have done anything to it, and also an example of what your RESULT might look like.




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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