Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

How to extract Max from a row in Query editor

Hi Team,   I am looking for a solution to be implanted in query editor, that I need to take max string from each row.   For example:   Loaded months Output M01 M01 M03 M03 M01,M0...
  • ImkeF's avatar
    ImkeF
    8 years ago

    You can add a column with this formua in it:

     

    List.Max(List.Transform(Text.Split([Loaded months], ","), Text.Trim))

    It splits the string up to a list, trims it (as you sometimes have spaces between your elements and sometimes not) and selects the MAX (in alphabetical order) from it.