Forum Discussion
Dicken
Post Prodigy
1 year agoAdding Recuring Index
Hi, is it possibel to replacate ; QUOTIENT(SEQUENCE(25,1,0,1),3)+1 in power Query without first addin an actual index ; so I've got ; Table.TransformColumns( Table.AddIndexColumn(So...
- 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.
Anonymous
1 year agoNot applicable
Why start the index at 0 and add the +1 when you could start at one and not add anything?
--Nate
ronrsnfld
Super User
1 year agoIf you start the Index at 1, but then integer/divide by 3, your result is not as desired. Note that it starts with "0,0,1" instead of the desired "1,1,1"