How to Get the Number of Weekdays in a Given Month in NetSuite

by | Aug 2, 2023 | Suite Guides

In today’s NetSuite guide, we will share a saved search showcasing how to get the number of weekdays in a given month. This saved search can help in determining how many weekdays in a month.

How to Calculate Weekdays in a Month

Sample Use Case:

This saved search is beneficial for companies operating on weekdays only, and want to see their monthly sales in a more concise manner – a daily sales report. The desired formula is to divide the sales quantity/amount by the number of days they are operational in a given month.

Undeposited Funds netsuite

How to build the Saved Search

1. Create a Transaction Saved Search with the following Standard Criteria:

  • Type = is Sales Order
  • Main Line = is true
  • (Optional) Date = use this to limit the data you want to see. E.g. “within this year”

2. Set the following in the Results tab:

Field Summary Type Function Formula Summary Label
Date Group Month Month
Amount Sum Amount
Formula (Numeric) Group to_char(last_day(trunc({trandate})),’DD’)-((trunc(last_day({trandate}),’IW’)-trunc(trunc({trandate},’MONTH’),’IW’))/7*2)-(decode(to_char(last_day(trunc({trandate})),’D’),1,2,7,1,0))+(decode(to_char(trunc({trandate},’MONTH’),’D’),1,1,0)) No. of Days
Formula (Currency) Sum {amount}/(to_char(last_day(trunc({trandate})),’DD’)-((trunc(last_day({trandate}),’IW’)-trunc(trunc({trandate},’MONTH’),’IW’))/7*2)-(decode(to_char(last_day(trunc({trandate})),’D’),1,2,7,1,0))+(decode(to_char(trunc({trandate},’MONTH’),’D’),1,1,0))) Sales per Day

Note: You may add additional fields that you want to see whenever you drill down on the Saved Search.

Wrapping Up

As a highly accredited NetSuite Solution Provider, ScaleNorth is well positioned to help you with the full scope of your NetSuite customization needs. If you require more NetSuite assistance, contact ScaleNorth today.

About the Author

Kouji is a seasoned professional in NetSuite Consulting, he brings a wealth of experience as an Ex-Director of Customer Support at NetSuite and Airbase. A Certified Public Accountant, his unique blend of financial expertise and technical savvy enables him to navigate complex challenges and provide innovative solutions. With a track record of leadership and a deep understanding of NetSuite intricacies, Kouji delivers seamless customer support strategies.

Speak with one of our Netsuite Experts today.

"*" indicates required fields

This field is for validation purposes and should be left unchanged.