3 Replies Latest reply on Mar 3, 2016 11:59 AM by Patrick A Van Der Hyde

    Calculated Field - If, then, filter by

    Raquel De Bastiani

      Hello,

       

      I am new to Tableau and need help figuring out a way to create a filter for my data. This is a preview of the data I have:

      IDStatusDate 1 (Placed)Date 2 (Fill)Date 3 (Start)
      001A1/1/20161/21/20161/22/2016
      002B1/2/20161/18/20161/19/2016
      003C1/3/20161/10/20161/11/2016
      004D1/4/20162/2/20162/3/2016
      005E1/5/20161/8/20161/9/2016
      006B1/6/20162/17/20162/18/2016
      007B1/7/20161/29/20161/30/2016
      008C1/8/20161/15/20161/16/2016
      009A1/9/20162/5/20162/6/2016
      010A1/10/20162/29/20163/1/2016
      011D1/11/20162/10/20162/11/2016

       

      What I am wanting the calculated field to do is, if the Status contains either A or B, then it will filter that row by Date 1 and give me the count. If Status contains C, then filter that row by Date 2 and give me the count. If Status contains either D or E, then filter that row by Date 3 and give me the count.

       

      So my final sheet would look like this:

          

      StatusDate 1 (Placed)Date 2 (Fill)Date 3 (Start)
      A or B6--
      C-2-
      D or E--3

       

      However, I don't see any part of the calculated field that would allow me to say "Filter by".

       

      Any suggestions would be extremely helpful.