# Tags
**Software** : [[02 - Tags/Software/Power Query]]
**Functions** used : [[Excel.CurrentWorkbook]] [[Table.TransformColumnTypes]] [[Table.SelectRows]] [[Table.UnpivotOtherColumns]] [[Table.Sort]] [[Table.Pivot]] [[List.Distinct]]
**Date** : 23-March-2026
# Description
In this video i show you how you can group a table and comma delimit the values of that grouping.
# Video Link
<iframe width="560" height="315" src="https://www.youtube.com/embed/cFJoeB7UkFs?si=T3NcuLbrs0nFjUd_" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
[GITHUB File Link]()
# M-Query
```mquery
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Sequence", Int64.Type}, {"Date", type date}, {"STOCK_1", type text}, {"STOCK_2", type text}, {"STOCK_3", type text}, {"STOCK_4", type text}, {"STOCK_5", type text}, {"STOCK_6", type text}}),
Unpivot = Table.SelectRows(Table.UnpivotOtherColumns(#"Changed Type", {"Date"}, "Attributes", "Values"), each [Attributes] <> "Sequence"),
Grouped = Table.Sort(Table.Group(Unpivot,
{"Date", "Attributes"},
{{"Codes", each Text.Combine(_[Values],",")}} ),
{{"Attributes", Order.Ascending}}),
Custom1 = Table.Pivot(Grouped, List.Distinct(Grouped[Attributes]), "Attributes", "Codes")
in
Custom1
```
## Optional Tags
**Tags** :
**Technique** :