Forum Discussion
monojchakrab
3 years agoResolver III
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...
- 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})
Vijay_A_Verma
3 years agoMost Valuable Professional
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})