Hi, in excel, which I've included, I have a formula to pick out the alphabet, numbers or sprcial characters from a string.
and the reusult is determined by switch looking to a drop down list,
I have tried to create this so ;
Table.AddColumn(Source, "Custom", each let
ttolist =
Text.ToList( [Text] ), alltext = List.RemoveMatchingItems( ttolist, { "0".."9"} ),
numbers =
List.RemoveMatchingItems( ttolist, alltext ) ,
special = List.RemoveMatchingItems( List.Transform( alltext, (A)=> Text.Lower(A)) , {"a".."z"} ) ,
alpha = List.RemoveMatchingItems( alltext, special)
in Text.Combine( special ))
but the last part following the in I do not want hard coded I have created a paramer of the options, but this does not work when plugged into
text.combine, I have attached all this. I think the problem is that it sees the value from the parameter as "text", not referring to the variable,
I have tried putting it withing the let so simplified ;
Table.AddColumn(#"Changed Type", "Custom", each let caps = Text.Split( Text.Upper([Text]) ," ") ,
lower = Text.Split( [Text], " ") ,
result = Text.Combine( selectorparameter )
in result )
but this does not work either? help?
Richard.
Bookmarks