Hey all,

I'm trying to accomplish a distinct Group-By index, by account number as pictured below and I want this to happen in the Power Query M-Code. I've done the numbered by grouping approach and it is just indexing the rows by each account. What I am looking to accomplish is depicted below. Any ideas? Trying to keep it as clean as possible without having to copy the table, remove dupes, and merge it back on itself.

Account Account Index
ABCD 1
ABCD 1
ABCD 1
ABCD 1
ACBD 1
EDFHG 2
EDFHG 2
EDFHG 2
EDFHG 2
EDFHG 2
IJKLM 3
IJKLM 3
IJKLM 3
IJKLM 3
IJKLM 3
NOPQ 4
NOPQ 4
NOPQ 4
NOPQ 4
RSTU 5
RSTU 5
RSTU 5
RSTU 5
RSTU 5
VWXYZ 6
VWXYZ 6
VWXYZ 6
VWXYZ 6