4 Replies Latest reply on Aug 16, 2018 12:21 AM by Martin Asztalos

    Excel's "CountIfs" in Tableau with String Comparison

    Martin Asztalos

      Hi,

       

      I am trying to mimic the Excel formula "CountIfs" in combination with an If statement in a calculated field.

      I found  some discussions here regarding "CountIfs" but not the answer I was looking for.

       

      My aim is to find for each FilterGroup if it has a FilterWW value of "Last WW".

      If a FilterGroup does have a value of "Last WW" then the result should be ok otherwise it is bad.

      How can I mimic this Excel formula in Tableau?

      And how can I write the formula in order to get the "ok" or "bad" as a string (this makes it easy to filter)?

       

      =IF(COUNTIFS($B$3:$B$13,"="&B3,$C$3:$C$13,"="&"LAST WW")>=1,"ok","bad")