PDA

View Full Version : PQ - restart numbering



sandy666
07-12-2023, 04:56 AM
srcsrcIndex

aa
1

aa
2

aa
3

bb
1

bb
2

BB
1

BB
2

cc
1

dd
1

dd
2

ee
1

ee
2

Ee
3

Ee
4

Ee
5

Ee
6

Ee
7

EE
1

EE
2

EE
3

eE
4

eE
5

eE
6

eE
7

eE
8



// 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