Forum Discussion

Merleau's avatar
Merleau
Helper II
1 year ago
Solved

Converting list elements based on their lengths

Hello, One column in my table is a list of strings. I would like to change the strings to lower case if their lenghts is greater than 1.   Name       Types N1    A,ABC,B,CDF,DF N2 H,JK...
  • jgeddes's avatar
    1 year ago

    Here is one way to do this...

    = Table.TransformColumns(previousQueryStep, {{"Types", each Text.Combine(List.Transform(Text.Split(_, ","), each if Text.Length(_) > 1 then Text.Lower(_) else _), ","), type text}})

    Using your example table you end up with...