Forum Discussion
Anonymous
5 years agoNot applicable
Condensing multiple If SEARCH dax formula
Hi all, Trying to condense down a formula where I need to search for multiple values in a column then output one of two outcomes, its working fine with many nested if(search( functions however I ...
- 5 years ago
Anonymous
You can try this measure:Formula = SWITCH( TRUE(), NOT ISEMPTY(INTERSECT({"a","b","c","d","e"},VALUES('Table'[Column1]))), "Outcome1", NOT ISEMPTY(INTERSECT({"f","g"},VALUES('Table'[Column1]))), "Outcome2", "No Outcome" )________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂
AlB
5 years agoCommunity Champion
Formula =
SWITCH (
TRUE (),
COUNTROWS (
FILTER ( { "a", "b", "c", "d", "e" }, SEARCH ( [Value], Table1[col1],, 0 ) > 0 )
) > 0, "outcome1",
COUNTROWS ( FILTER ( { "f", "g" }, SEARCH ( [Value], Table1[col1],, 0 ) > 0 ) ) > 0, "outcome2",
""
)
Please mark the resolved question when you are finished and consider giving a thumbs up if the posts are useful.
Contact me privately for assistance with any large-scale BI needs, tutoring, etc.
Bless you