Forum Discussion

Grosskopf's avatar
Grosskopf
New Member
4 years ago
Solved

Add Column recalculates on Filter Column - faster option?

I have a query that compares a value in a row to the same value in a previous row. If the value is the same in the previous row the Add Column value is set to 0, if the value is different to the valu...
  • wdx223_Daniel's avatar
    4 years ago

    NewStep1=Table.Buffer(#"Added Index"),

    NewStep2=Table.FromRecords(List.Accumulate(Table.ToRecords(#"Reorder Columns"),{},(x,y)=>if NewStep1{y[Index]}[Index]=0 or NewStep1{y[Index]-1}[Name]<>y[Name] then x&{y} else x))