
1. Re: Calculating Skewness and Kurtosis for a distribution in Tableau as formula?
patrick.byrne.0 Oct 19, 2017 7:03 AM (in response to bhairav.mehta)Hello Bhairav,
I believe this might be possible using the functions available in Tableau Desktop, thought I am not a statistical expert or a calculations expert. But, I did find the following information on the functions in Tableau Desktop
If you run into a particular issue trying to build the calculation, I would suggest posting what has been attempted as a packaged workbook, there is a better chance the community will be able to assist!
Happy analyzing and I hope this helps!
Cheers,
Byrne, Patrick

2. Re: Calculating Skewness and Kurtosis for a distribution in Tableau as formula?
Alan Huddart Jul 17, 2018 1:54 PM (in response to bhairav.mehta)Hi Bhairav,
I managed to create my own version of Kurtosis just using calculated fields. This will replicate the KURT() function as used in Microsoft Excel.
Firstly, there is a FIXED calculation to get the COUNT of all records (not sure if it is possible to replace this calculation and put it into the following Kurtosis calculated field directly):
{FIXED:COUNT([Metric])}
Then this calculation should provide you with the Kurtosis figure:
(
((SUM([Count])*(SUM([Count])+1))
/
((SUM([Count])1)*(SUM([Count])2)*(SUM([Count])3)))
*
SUM((([Metric]  {FIXED:AVG([Metric])})/{FIXED:STDEV([Metric])})^4)
)

((
(3*((SUM([Count])1)^2)))
/
((SUM([Count])2)*(SUM([Count])3)
))
I've attached a workbook with an example of this (as well as the source file) and have added extra metrics to break down the different steps that go along with this. Calculation is based off the Excel Help page which explains the KURT() function.
Hope this helps!
Alan

Kurtosis Test.xlsx 26.4 KB

Kurtosis Calculcation.twbx 34.0 KB


3. Re: Calculating Skewness and Kurtosis for a distribution in Tableau as formula?
Alan Huddart Jul 17, 2018 2:16 PM (in response to Alan Huddart)3 of 3 people found this helpfulSimilarly, Skewness can be calculated with the following calculation (assuming you already have the Count metric which I show above):
(SUM([Count])
/
((SUM([Count])1) * (SUM([Count])2)))
*
SUM((([Metric]  {FIXED:AVG([Metric])})/{FIXED:STDEV([Metric])})^3)Again, this is based on the SKEW() function in Excel.