Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How do I filter this?

Hello, I have a table with multiple columns. I need to count Column A, but only if it contains "TW/" or "TCH/". But it should only count if Column B contains the word "long". I managed to count the ...
  • amitchandak's avatar
    4 years ago

    Anonymous , You can add like

    X = calculate(COUNTROWS(Table),SEARCH("TW/",Table[A],,0) , [column B]= "long") + calculate(COUNTROWS(Table),SEARCH("TCH/",Table[A],,0) , [column B]= "long")

     

    or try like

     

    X = calculate(COUNTROWS(Table),filter( (SEARCH("TW/",Table[A],,0) >0 || SEARCH("TCH/",Table[A],,0) >0 )&& [column B]= "long"))