Forum Discussion

Hansolu's avatar
Hansolu
Helper II
1 year ago
Solved

Add a paired index column

Hi,  I am struggeling to add a paired index column into a nested table in PQ   I know how to add an index in the nested table like 1,2,3,4,5,.... what i do need to add is another column lik 1,1,2...
  • Fowmy's avatar
    1 year ago

    Hansolu 

    First, add a simple index column starting with zero:

    Table.AddIndexColumn(Source, "Index", 0, 1, Int64.Type)


    then the second one

    Number.IntegerDivide([Index], 2) + 1


    Result