Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Microsoft Power BI Community
- Galleries
- Quick Measures Gallery
- Kendall's Tau

Greg_Deckler

Super User

Kendall's Tau

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-16-2019
12:17 PM

As explained here: https://www.statisticshowto.datasciencecentral.com/kendalls-tau/, Kendall's Tau, or Kendall Rank Correlation Coefficient, is a non-parametric measure of relationships between columns of ranked data. The Tau correlation coefficient returns a value of 0 to 1, where:

- 0 is no relationship
- 1 is a perfect relationship

A quirk of this test is that it can also produce negative values (i.e. from -1 to 0). Unlike a linear graph, a negative relationship doesn’t mean much with ranked columns (other than you perhaps switched the columns around), so just remove the negative sign when you’re interpreting Tau.

Several version’s of Tau exist.

- Tau-A and Tau-B are usually used for square tables (with equal columns and rows). Tau-B will adjust for tied ranks
- Tau-C is usually used for rectangular tables. For square tables, Tau-B and Tau-C are essentially the same.

Most statistical packages have Tau-B built in, but you can use the following formula to calculate it by hand:

**Kendall’s Tau = (C – D / C + D) **

Where C is the number of concordant pairs and D is the number of discordant pairs.

Pay attention to the setup of this one, you need to make sure that you start with a sorted, ranked column of values. The measure in Power BI looks like this:

Kendall's Tau = VAR __table = 'Data' VAR __table1 = ADDCOLUMNS(__table,"__Concordant",COUNTROWS(FILTER(__table,[Index]>EARLIER([Index])&&[Interviewer2]>EARLIER([Interviewer2])))) VAR __table2 = ADDCOLUMNS(__table1,"__Discordant",COUNTROWS(FILTER(__table,[Index]>EARLIER([Index])&&[Interviewer2]<EARLIER([Interviewer2])))) VAR __C = SUMX(__table2,[__Concordant]) VAR __D = SUMX(__table2,[__Discordant]) RETURN ABS(DIVIDE(__C - __D , __C + __D,0))

eyJrIjoiYzViZWY5NjQtMzM1Ny00MzQ4LTkxMzQtMjgzMWRhZjljYTc2IiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9

Proud to be a Datanaut!