Forum Discussion
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.
- Anonymous3 years ago
Hi jamiers ,
Here's my final outcome.
And below are my steps.
1.Group by account_id and add a column to keep all rows.
2.Add an index column.
3.Add a column contains All MC Pos values.
4.Extract values from list as follows.
5.Expand the "AddIndexColumn", you will get the following. Filter out the Index 2 to get the final outcome.
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.
4 Replies
- ToddChittSuper 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.
- jamiersHelper I
- ToddChittSuper 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"?
- AnonymousNot applicable
Hi jamiers ,
Here's my final outcome.
And below are my steps.
1.Group by account_id and add a column to keep all rows.
2.Add an index column.
3.Add a column contains All MC Pos values.
4.Extract values from list as follows.
5.Expand the "AddIndexColumn", you will get the following. Filter out the Index 2 to get the final outcome.
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.