title: Countif comparing dates in Tableau
body: <p>I am trying to create a table where it only counts the attendees one one type of training (rows) if they attended another particular training (column) AFTER the first one. I think I need to recreate a countif function that compares the dates of the trainings, but not sure how to set this up so that it compares the dates of the row trainings and column trainings.  Any ideas?</p>
  
  <p><strong>Edit 3/23</strong></p>
  
  <p>Alex, your solution would work if I had different variables for the dates of each type of training.  Is there a way to construct this without having to create new variables for each type of training that I want to compare? Put another way, is there a way to refer to the rows and columns of the table in the formula that would compare the dates? So, something like "count if the start date of this column exceeds the start date of this row." (basically, is there something like the Excel index function in Tableau?)</p>
  
  <p>It may help to see how my data is structured -- here is a scrubbed version: <a href="https://docs.google.com/spreadsheets/d/1YR1Wz-pfGHhBxDQDGYgmemLGoCK0cSvKOeE8w33ZI3s/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1YR1Wz-pfGHhBxDQDGYgmemLGoCK0cSvKOeE8w33ZI3s/edit?usp=sharing</a></p>
  
  <p>The "table" tab shows the table that I'm trying to create in Tableau. </p>