Forum Discussion
Anonymous
6 years agoNot applicable
Wildcard in search function
Hi all, I'm trying to figure out how to use the wildcard within my search code as I don't want to repeat the code over and over so if I have Oranges it will put it in the Oranges catagory but if ...
- 6 years ago
Anonymous , I think it should be like
SearchFeature = SWITCH (
TRUE (),
SEARCH ( "Oranges", 'Query1'[Column],, 0 ) > 0, "Oranges",
"Others")Search return position
Greg_Deckler
Community Champion
6 years agoAnonymous - I am not aware of any wildcard matching in SEARCH of FIND or CONTAINSSTRING. Should be able to use CONTAINSSTRING I think.
I usually use something like:
SearchFeature =
SWITCH (
TRUE (),
SEARCH ( "Oranges", 'Query1'[Column],, 0 ) > 0, "Oranges", "Others"
)
I did invent a Fuzzy string matching algorithm just recently though!
https://community.powerbi.com/t5/Quick-Measures-Gallery/Fuzzy/td-p/1352914