Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.7k views
in Technique[技术] by (71.8m points)

excel - PowerQuery: How can I concatenate grouped values?

If I have the following table (shown in the image below), how can I write a grouped query that would concatenate the grouped results?

InputTable

For this example, I'd want to group by the LetterColumn and concatenate the NumberColumn

So the desired results would be:

ResultsTable

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can use the GUI to do it this way:

  1. Select your LetterColumn and then Transform / GroupBy: enter image description here

  2. Select Add Column / Custom Column: enter image description here

  3. Click opposing arrows at top right of new AllData column to Extract Values from new AllData column:

    enter image description here enter image description here

  4. Remove AllData column.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...