/    /  Amazon QuickSight – netWorkDays

Amazon QuickSight – netWorkDays

 

The networkdays function in Amazon QuickSight calculates the number of business days between a start date and an end date, excluding weekends and any holidays that you specify.

Syntax

#Start#
NETWORKDAYS(startDate, endDate[, holidayList])
#End#

 

This function takes three arguments:

 

  • startDate (required): the start date of the date range.
  • endDate (required): the end date of the date range.
  • holidayList (optional): a list of holidays to exclude from the calculation. This parameter should be a comma-separated list of dates in the format MM/DD/YYYY.

 

 

Suppose you have a dataset containing a list of tasks with their start and end dates, and you want to calculate the number of business days between the start and end dates of each task.

 

Assume the following dataset:

 

Task IDStart DateEnd Date
102/25/202303/07/2023
203/01/202303/14/2023
303/07/202303/12/2023
403/08/202303/15/2023
503/11/202303/18/2023

 

To calculate the number of business days between the start and end dates of each task, you can create a calculated field using the networkdays function:

 

Example

#Start#
NETWORKDAYS({Start Date}, {End Date})
#End#

 

This will result in a new column showing the number of business days between the start and end dates of each task:

 

Task IDStart DateEnd DateNetworkdays
102/25/202303/07/20239
203/01/202303/14/202310
303/07/202303/12/20233
403/08/202303/15/20236
503/11/202303/18/20235

 

In this example, the networkdays function calculates the number of business days between the start and end dates of each task, excluding weekends and any holidays that you specify. If you wanted to exclude specific holidays from the calculation, you could add a third parameter to the function containing a comma-separated list of the holiday dates in the format MM/DD/YYYY.