Forum Discussion
Tillyz
3 years agoNew Member
Index column based on values
Hi everyone, I would like to create an index column in power query/dataflow based on different projects. But now query only gives me this: Is that possible to achieve the fir...
- 3 years ago
NewStep=Table.FromRecords(List.Accumulate(Table.ToRecords(PreviousStepName),{{},[]},(x,y)=>let a=Record.FieldOrDefault(x{1},y[Project Name],Record.FieldCount(x{1})+1)+1/100 in {x{0}&{y&[Index=a]},x{1}&Record.AddField([],y[Project Name],a)}){0})
wdx223_Daniel
3 years agoCommunity Champion
NewStep=Table.FromRecords(List.Accumulate(Table.ToRecords(PreviousStepName),{{},[]},(x,y)=>let a=Record.FieldOrDefault(x{1},y[Project Name],Record.FieldCount(x{1})+1)+1/100 in {x{0}&{y&[Index=a]},x{1}&Record.AddField([],y[Project Name],a)}){0})
- Tillyz3 years agoNew Member
Thank you very much, it worked and helped me a lot.