Forum Discussion
Adding Recuring Index
- 1 year ago
AFAIK, you can't do to directly get your desired output. But you could do something like:
= Table.AddIndexColumn(Source, "Index", 2/3,1/3) or = Table.AddIndexColumn(Source, "Index", 2/3,1/3, Int64.Type)and then, at the next step, change the data type to Int64.Type (whole number).
I would have thought is would do the conversion in the same step, but it does not.
Yes also used
= let alist = {0..Table.RowCount( Source)-1 } ,
index = List.Transform( alist, (x)=>
Number.IntegerDivide( x, 3 ) + 1 ) in index
and then Table from / to columns , to get result.
I was more interested in if there was a way to manipulate add index
AFAIK, you can't do to directly get your desired output. But you could do something like:
= Table.AddIndexColumn(Source, "Index", 2/3,1/3)
or
= Table.AddIndexColumn(Source, "Index", 2/3,1/3, Int64.Type)
and then, at the next step, change the data type to Int64.Type (whole number).
I would have thought is would do the conversion in the same step, but it does not.
- Dicken1 year ago
Post Prodigy
Thats pretty good, I can't remember what it was but had a different situation, where I had
to do a transformation and THEN apply the data type as here.
I'll mark this closed.