Tigerexcel
Active Member
- Joined
- Mar 6, 2020
- Messages
- 493
- Office Version
- 365
- 2019
- Platform
- Windows
I'm trying to educate myself with PQ and would like to know how to do this more efficiently. I've got this from a youtube video
and one of the comments below is that the Convert to List from Table mode can be avoided through the use of Text.Combine but I can't get it to work and keep getting an error. The author of the video uses a Custom Column and I'd like to avoid it if it's not absolutely necessary. My desired output is the same as what the author ultimately gets.
My coding is ok up to this point, I just need to know how to do the Text.Combine part.
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Category", type text}, {"Name", type text}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"Category"}, {{"Count", each _, type table}})
in
#"Grouped Rows"
The data is:
My coding is ok up to this point, I just need to know how to do the Text.Combine part.
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Category", type text}, {"Name", type text}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"Category"}, {{"Count", each _, type table}})
in
#"Grouped Rows"
The data is:
Category | Name |
Orange | Alex |
Blue | Jerry |
Gold | Frank |
Black | Kas |
Orange | Tim |
Orange | Ted |
Gold | Jake |
Black | Fred |
Orange | Harry |
Blue | Noel |
Gold | Jude |
Black | Fingle |
Orange | Eva |
Blue | Jake |
Gold | Ned |