Calculating Business Days – Alteryx version of NETWORKDAYS

Calculating Business Days – Alteryx version of NETWORKDAYS

2020.03.24

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

(日本語版はこちらから)

Introduction

Sometime ago a colleague asked whether there is any equivalent function as NETWORKDAYS in Alteryx. I was baffled at first, but later on created an equivalent workflow in Alteryx to solve the problem.

Usually HR team, Project manager or Payroll manager heavily rely on this functionality in Excel to calculate number of working days. One can even register a list of holidays and have them excluded while calculating the number of workdays within a period. The syntax for Excel is: NETWORKDAYS( start_date, end_date, [holidays] ) Alteryx equivalent is as described in this blogpost.

Workflow

Add your dates into the workflow in this format, (yyyy-mm-dd). Calculate the day as shown below.

Now add a filter to remove weekends (Saturday and Sunday).

You can add a list of other fixed holidays such as public holidays and join it with the primary data to exclude those holidays as shown below.

In the above step,all holidays are removed from the combined data. In order to calculate the number of business days, we need to pick the first date by sorting the dates ascendingly and picking-up the first date as shown below.

The first date obtained from previous step is added to the primary data as a new column.

Finally, the number of business days are calculated as shown here.

Conclusion

So by using this workflow you can re-create the desired functionality in Alteryx to count the number of business days. If you are subscribed with our company as a registered user, then you can download this workflow from a specified webportal.


データ分析基盤ならCSAにおまかせください!

クラスメソッドでは、データ分析に関わる皆様の作業コストを削減し、分析アクションを促進・効率化・自動化するためのデータ分析基盤「カスタマーストーリーアナリティクス」を提供・展開しています。興味をお持ち頂けた方は下記バナーをクリックし、詳細をご覧頂けますと幸いです。(各種問い合わせも承っております)

データ分析基盤を最短1ヶ月で導入可能


また、現在クラスメソッドでは毎週無料の相談会を開催しています。データ分析基盤の構築から、BIツール、データ統合など、ビッグデータ分析の導入や活用、技術についてお気軽にご相談ください。

データ分析相談会

この記事をシェアする

データ分析基盤を最短1ヶ月で導入できる

関連記事