
1. Re: Calculating the difference between two days excluding weekends with days in decimals
patrick.byrne.0 Oct 23, 2017 11:37 AM (in response to Vikram Kalimuthu Babu Satyakandhan)Hello Vikram,
To create the desired view some additional steps would need to be taken. As the ability to have the DATEDIFF formula return decimal values for the next part of the date is not currently built in to the function. I would suggest posting the Idea to the Tableau Community Idea: Ideas . This helps us evaluate the next features to add to the Tableau products.
One way that you could accomplish the desired view, is to create two individual calculations, one that returns the days, the other that returns the hours. The DATEDIFF calculation will then need to be converted to a decimal. This can be accomplished by taking the integer value and dividing it by 24 in another calculation.
Once both calculations are created and our hour has been converted to a decimal, we can combine the calculations to display the value as desired. Do not include the brackets below for this example.
{
SUM([DateDiff  day] ) + SUM ([DateDiff  hour])
}
Additionally, to remove weekends from the data, please review the following Tableau Community post.How to Exclude Weekends
I hope this helps!
Cheers,
Byrne, Patrick