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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jamiers
Helper I
Helper I

Grouped Rows with Extra Columns

Hi All,  I have the following Power Query setup:

let
    Source = #"!Active-MC",
    #"Reordered Columns" = Table.ReorderColumns(Source,{"account_id", "Name (link)", "Member #", "Email", "T", "ProfileLink", "Position Name.1", "Position Name.2", "Start Date", "First Name", "Preferred Name", "Last Name", "account_id text", "MC Pos"}),
    #"Removed Other Columns" = Table.SelectColumns(#"Reordered Columns",{"account_id", "Name (link)", "Member #", "Email", "T", "ProfileLink"}),
    #"Sorted Rows" = Table.Sort(#"Removed Other Columns",{{"Member #", Order.Ascending}}),
    #"Buffer Table" = Table.Buffer(#"Sorted Rows"),
    #"Grouped Rows" = Table.Group(#"Buffer Table", {"Member #"}, {{"T", each Text.Combine([T],"
"), type nullable text}})  
in
    #"Grouped Rows"

 

Here is an Excel document with the data before, data after the query, and then what I want.

Grouped Rows Question.xlsx

 

Is there any way to accomplish the last tab so it groups the rows based on Member # and the T field, but keeps some of the additional columns?

 

Thanks

1 ACCEPTED SOLUTION
ronrsnfld
Super User
Super User

Just Group by all those other columns.

eg:

   #"Grouped Rows" = Table.Group(#"Previous Step", {"account_id", "Name (link)", "Member #", "Email"}, {
        {"T", each Text.Combine([T], "#(lf)"), type text}}) 
in
    #"Grouped Rows"

ronrsnfld_0-1660441590076.png

 

 

View solution in original post

1 REPLY 1
ronrsnfld
Super User
Super User

Just Group by all those other columns.

eg:

   #"Grouped Rows" = Table.Group(#"Previous Step", {"account_id", "Name (link)", "Member #", "Email"}, {
        {"T", each Text.Combine([T], "#(lf)"), type text}}) 
in
    #"Grouped Rows"

ronrsnfld_0-1660441590076.png

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors