Forum Discussion

rbreneman's avatar
rbreneman
Helper II
4 years ago
Solved

Remove duplicate and control which row stays

Hi! I have a pretty simple query, two columns. Column A is the name of a school and column B is an ID number. I want to remove the duplicate ID number, but keep the row that has the shortest name. T...
  • wdx223_Daniel's avatar
    4 years ago

    NewStep=Table.FromRecords(Table.Group(PreviousStepName,"ColumnB",{"n",each Table.Min(_,each Text.Length([ColumnA]))})[n])