Articles in this section
Category / Section

How to Calculate Number of Weekdays Between Two Dates

Published:

Bold BI users can calculate and showcase weekdays between two dates in a dashboard widget by use of a calculated column (a.k.a expression). The expression column will show the day difference between the two dates as explained in this article.

Use Case

For instance, in Project Management, the user would like to showcase the number of days between the task start date to the end date then the user must calculate the days between the two dates.

Creating the expression column

You can create the expression column with the date columns to show the number of weekdays. Follow the given steps to achieve this.

  1. Click on fx Add Expression on the assign data tab to navigate to create the expression.

  2. Configure the expression for the date as follows. image.png

    DATEDIFF(day,[start_date],[end_date]) 
    

    Note: This expression has been tested with PostgreSQL and MSSQL, but it may not work for some data sources due to differences in the date formatting functions.

  3. Click Save and Close the expression designer page.

Configuring the expression column to the widget

You can configure the expression column in the widget to showcase the number of days between the two dates. Refer to the following image which calculated the difference between start_date and end_date. image.png

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