Forum Discussion

RoydenC's avatar
RoydenC
New Member
3 years ago
Solved

Data Profile: Min and Max Text Length

Hello I am currently profiling my data using the Table.Profile() function and it's working. My issue is that I also need it to provide me the min and max length of the text in the data.   This work...
  • ronrsnfld's avatar
    3 years ago

    You need to create a List of the lengths in order to apply the LIst.Min or List.Max functions

     

    profile = Table.Profile(#"Table to Profile", {
            {"Max Text Length", each Type.Is(_, type nullable text), each List.Max(List.Transform(_, each Text.Length(_)))},
            {"Min Text Length", each Type.Is(_, type nullable text), each List.Min(List.Transform(_, each Text.Length(_)))}
            })