Forum Discussion
help with a custom function
Hello, how to simplify the function if the query? (Table.AddColumn) too lazy to write up to 20 function attachments if
let
Souce= {"power querry","poweer query","pooower que1ry"},
#"Table.FromList" = Table.FromList(Souce, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Table.AddColumn" = Table.AddColumn(Table.FromList, "Group", each if Text.Contains([Column1],"power") then "power" else
if Text.Contains([Column1],"query") then "query" else
null)
in
#"Table.AddColumn"
Seems that you're looking for a partial-match-lookup, where you can put your search-values in a table. Please check this post:
https://community.powerbi.com/t5/Desktop/joinAlgorithm-and-keyEqualityComparers/m-p/182148#M79842
Imke Feldmann
www.TheBIccountant.com -- How to integrate M-code into your solution -- Check out more PBI- learning resources here
3 Replies
- ImkeFCommunity Champion
Seems that you're looking for a partial-match-lookup, where you can put your search-values in a table. Please check this post:
https://community.powerbi.com/t5/Desktop/joinAlgorithm-and-keyEqualityComparers/m-p/182148#M79842
Imke Feldmann
www.TheBIccountant.com -- How to integrate M-code into your solution -- Check out more PBI- learning resources here
- mechanix85Helper I
ImkeF, cool! Thank you:smileyhappy:
- mechanix85Helper I
It works, but it's very slow for my table (100,000 lines of the Product Reference), taking into account the links. Are there any other options?