I use a handy process from Rob Collie's site to find item descriptions that contain certain text. However, the problem is that Power Query strips trailing spaces from my search values. So if I search for "rat " with a space I get "laboratory", "calibrator", and other variations because PQ has stripped the trailing space.
How can I get PQ to retain the space so I can only return rodents?
Code:
let
/*
List of search terms to match against
*/
SourceList = {"Angiocath",
"Bandage",
"Catheter",
"Electrode",
"Glove",
"Latex",
"Latex Free",
"Mice",
"Mouse",
"MRI Safe",
"Needle",
"Rat ",
"Screw",
"Sponge",
"Stent",
"Suture",
"Syringe",
"Wire"},
StartList = Table.FromList(SourceList,Splitter.SplitByNothing(),{"Keyword"}),
ChangeToText = Table.TransformColumnTypes(StartList,{{"Keyword", type text}}),
AddIndex = Table.AddIndexColumn(ChangeToText, "Keyword Index", 1, 1),
ChangeToInteger = Table.TransformColumnTypes(AddIndex,{{"Keyword Index", Int64.Type}})
in
ChangeToInteger
How can I get PQ to retain the space so I can only return rodents?