Forum Discussion
vissvess
7 years agoHelper V
Summarize or aggregate multiple columns
Hi, My data set is like follows. Col 1 Col 2 Col 3 .... .... .... ABC ABC XYZ ..... .... .... ABC DEF ABC ..... .... .... DEF XYZ ABC ..... ..... .... ..... ...
- 7 years ago
Zubair_Muhammad
7 years agoCommunity Champion
In this case we can adjust the formula as follows.
You can specify the column names in place of the code in red font below
Text.Combine(
Table.AddColumn(
Table.Sort(
Table.Group(
Table.SelectRows(
Record.ToTable(
Record.SelectFields(_,{"Col 1","Col 2","Col 3","Col 4"})
),each [Value] <> null and [Value] <> "")
,"Value",{{"result",each Table.RowCount(_), type number}}),
{{"Value", Order.Ascending}}),
"Merged",
each [Value] & "(" & Text.From([result]) & ")")[Merged],
", ")Zubair_Muhammad
7 years agoCommunity Champion