src src Index
a a
1
a a
2
a a
3
b b
1
b b
2
B B
1
B B
2
c c
1
d d
1
d d
2
e e
1
e e
2
E e
3
E e
4
E e
5
E e
6
E e
7
E E
1
E E
2
E E
3
e E
4
e E
5
e E
6
e E
7
e E
8


Code:
// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Grp = Table.Group(Source, {"src"}, {{"Index", each Table.AddIndexColumn(_,"Index", 1, 1)[Index], type list}}),
    Exp = Table.ExpandListColumn(Grp, "Index")
in
    Exp