3 Replies Latest reply on Jul 31, 2017 12:52 PM by Jeremy Bayless

    Calculated Field - Multiple Criteria

    Jeremy Bayless

      Greetings all.  I am literally just getting started with Tableau and have already hit a problem which I haven't been able to figure out by searching online alone - so I'm here hoping that someone can offer some advice/suggestions.


      What I am doing is working on a dumbbell chart to show the month/month change in customer communications.  The data I am using is called "Date Received" and "Reason"


      I currently have the dumbbell chart set up to work correctly - I am using a filter that says:


      (DATEPART('month',[Date Received])) = (MONTH(TODAY())-2)


      (DATEPART('month',[Date Received])) = (MONTH(TODAY())-1)


      Right now it is July - so the only two months looked at are May/June - which is what I want and next month it will look at June/July.


      The dumbbells then show how many instances of a particular reason there were for May and for June -> with a line showing the difference between the two (Did that reason increase or decrease).


      The only caveat is I have a "Reason" filter where when the month changes I would have to go out and deselect any of the reasons I don't want to see - for instance if May had a particular Reason but June had no activity for that reason - I don't want to report that.


      Not wanting to have to go out and manually adjust this, I know there has to be a way to update the filter to look at both criteria:


      Is Date Received May and is the reason <> Null


      Is Date Received June and is the reason <> Null


      Bring back results


      However - I am not having any luck with doing this.  I've tried some Case and If statements but they always have an error that I can quite figure out.


      Thanks for any assistance with this - and I hope I've explained this adequately.


      I can't upload a workbook, but I can give an example of what the data is like:


      With the below set of data I would expect to see


      May: Broken Link   

      June: Broken Link  

      May: Question 

      June: Question



      Date ReceivedReason
      05/01/2017Broken Link
      05/01/2017Broken Link
      06/01/2017Broken Link
      06/28/2017Broken Link