How it works...

The Concordant and Discordant columns are simply for visualization purposes, but their calculations are nearly identical to equivalent calculations in our Kendall's Tau measure, so we will start by explaining the calculation of the Concordant and Discordant columns.

The purpose of the Concordant column is to find the number of rows in the data table, R06_Table, where both interviewers have larger values than the current row value for Interviewer1 and Interviewer2. Because Concordant is a column, we use the ALL function to break out of the row context. We then use the FILTER function to select only the rows where the Interviewer1 column is larger than the current value of the Interviewer1 column (EARLIER) and the Interviewer2 column is larger than the current value for the Interviewer2 column (EARLIER). We then use COUNTROWS to count the number of rows returned from the FILTER function.

The calculation of the Discordant column is almost identical to the Concordant column. The only difference is that we count the number of rows where the Interviewer1 column is larger than the current value for the Interviewer1 column (EARLIER) and the Interviewer2 column is smaller than the current value for the Interviewer2 column (EARLIER).

For our Kendall's Tau measure, we start by creating the table variable, __Data, and setting the value for __Data equal to our base table, R06_Table. This is done for ease of reference. Next, we create the table variable, __Table. For our __Table variable, we start with our table variable, __Data. To this table, we add the __Concordant and __Discordant columns. The __Concordant and __Discordant columns are simply implementations of our Concordant and Discordant columns described previously. 

We now sum our __Concordant and __Discordant columns and store these values in the __C and __D variables respectively. Finally, we RETURN the absolute value of __C minus __D divided by the sum of __C and __D