- If column A contain "TP" then "Yes".
- If column A contain "TP-" then "Yes".
- If column A contain "-A" then "Yes".
- If column A does not contain "TP","TP-","-A" then desired result is "No".
In Excel I am applying the following formula in order to get the my final result.
=IF(SUM(COUNTIF(A2,{"*TP","*TP-*","*-A*"})),"YES","NO")
Note:
Column A contain text and numbers and Prefix and suffix or prefix with suffix as well.
DATA and DESIRED RESULT;
ITEM DESIRED RESULT
1234567TP YES
1234567TP-0001 YES
1234567TP-0001DR YES
1234567TP-DR0001DR YES
1234567TP-A0006DR YES
1234567TP-A90001DR YES
1234567TP-A0001DR YES
7674859YO-A891 YES
456YO-A12 YES
87654HI-A0000098 YES
1234678VU NO
1234678VU-P00094 NO
1234678VU-P00089 NO
1234678VU-P00567 NO
question from:https://stackoverflow.com/questions/65830597/switch-true-the-same-column-contain-multiple-search-criteria-in-power-bi