Net Workdays
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello Alteryx:
How can I convert this excel formula into Alteryx?
=NETWORKDAYS(A2, TODAY())
Appreciate your help.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
There is no specific formula to recreate this function in Alteryx, but we can recreate the output with a couple tools.
I'm using a Generate Rows tool to create all dates between the input date and today's date, then identifying the day of the week for each date, filtering out the weekends, and finally using a Summarize tool to count the days.
In the example I provided, I've included a Join tool just to validate that the output matches your desired output.
Let me know if this works for you.
Cheers!
Phil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi -
I came up with a single-tool solution:
The Formula tool calculates a few, relatively simple numbers, and determines the number of work days. I've run a few test cases, and they all tie to the Excel function. Dataset and workflow attached.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Awesome!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
On the Net workdays, I am getting 0 or 1. I can not see the exact difference number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi -
I'm not sure I understand your question. When I run the workflow with the sample data that was attached, I see this:
Let me know if I can assist.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How about, I have start day. There is no end date. The Networkdays are calculated as of yesterday. Which I want as in Today()-1
I consider only Saturday and Sunday as weekends.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi -
Then you have two choices - either include an end date in your data source, or modify the Formula tool to use/calculate/default an end date as you desire.
The formulas are expecting an end date, so one needs to be provided.
Mark
![](/skins/images/A7612391DEAF4EF69C140133EA533832/responsive_peak/images/icon_anonymous_message.png)