Articles in this section
Category / Section

How to Calculate Average Turnaround Time in BoldBI

Published:

In certain scenarios, you may need to calculate the average turnaround time between two dates for multiple orders. This article will guide you through the process of calculating the average turnaround time using BoldBI.

Steps to Calculate Average Turnaround Time

Consider you have the below data

image.png

Step 1: Calculate Average Turnaround Time in Seconds

To calculate the average turnaround time in seconds, use the following expression:

TOTAL(SUM(DATEDIFF(s, [startdate], [enddate])))/ <Total number of items>

Replace [startdate] and [enddate] with the appropriate column names from your dataset.
image.png

Step 2: Convert the Seconds into the Desired Format

To convert the seconds into the desired format (e.g., days, hours, minutes, and seconds), use the following expression:

convert(varchar, FLOOR([Total time difference]/86400)) + 'd' + ' ' + convert(varchar, FLOOR([Total time difference]%86400/3600)) + ':' + convert(varchar, FLOOR([Total time difference] %3600/60)) + ':' + convert(varchar, FLOOR(([Total time difference])%60))

Replace [Total time difference] with the result from Step 1.
image.png

The time difference will be retrieved in the required format.

image.png

Note: These expression has been tested with Microsoft SQL Server, but it may not work for some data sources due to differences in the date formatting functions.

Conclusion

By following these steps, you can calculate the average turnaround time for multiple orders using BoldBI. If you need further assistance, please feel free to reach out to our support team.

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
IJ
Written by Israel Jebaraj Chandirakumar
Updated:
Comments (0)
Please  to leave a comment
Access denied
Access denied