Forum Discussion
RoydenC
3 years agoNew Member
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...
- 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(_)))} })
ronrsnfld
3 years agoSuper User
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(_)))}
})
- RoydenC3 years agoNew Member
Thank you for taking the time to post the solution and an explanation. It worked wonderfully. Much appreciated!