Forum Discussion

ShaneL79's avatar
ShaneL79
Icon for Helper I rankHelper I
6 years ago
Solved

Contains Partial Text

This is probably a dumb question, but I want to countrows where "blue" is contained within the column. 
 
The column typically has several results that look like this "Red >> Blue >> Orange"
 
I know equals is "=", and does not equal is "<>", but what is contains? 
 
Here is the sample of my code, which structure I would like to maintain for the sake of my beginner knowledge.
 
 
Assessments =

 

CALCULATE (
COUNTROWS (Alarms),
Alarms[Assessments Employee] = " Blue ",
  • Hi ShaneL79

     

    You can also use "find" or "seach",such as:

     

    Assessments=
    var a =search("blue",SELECTEDVALUE('Alarms'[Assessments Employee]),,0)
    Return
    IF(a<>0,COUNTROWS('Alarms'),BLANK())

     

     

    Best Regards,
    Kelly
     
    Did I answer your question? Mark my post as a solution!

2 Replies