Forum Discussion

monojchakrab's avatar
monojchakrab
Resolver III
3 years ago
Solved

extract text strings from a column using a specified list of strings

Hiya everyone,   I have a column which has text and numeric strings as follows. My problem is that I need to extract only the text strings which appear in a separate list provided separately.   T...
  • Vijay_A_Verma's avatar
    3 years ago

    I am assuming that for last one you need both 300 and 80

    Then use below code

    Text.Combine(List.Select(Text.Split(Text.Trim(Text.Combine(List.Transform(Text.ToList([Title]), (x)=> if Value.FromText(x) is number then x else " "), ""))," "), (x)=> Text.EndsWith(x,"0")), ", ")

    if you needed only 300

    Value.FromText(List.Select(Text.Split(Text.Trim(Text.Combine(List.Transform(Text.ToList([Title]), (x)=> if Value.FromText(x) is number then x else " "), ""))," "), (x)=> Text.EndsWith(x,"0")){0})