Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Net Workdays

Kinetic_analytics
11 - Bolide

Hello Alteryx:

How can I convert this excel formula into Alteryx?

 

=NETWORKDAYS(A2, TODAY())

 

Appreciate your help.

 

Thanks

7 REPLIES 7
Maskell_Rascal
13 - Pulsar

Hi @Kinetic_analytics 

 

There is no specific formula to recreate this function in Alteryx, but we can recreate the output with a couple tools. 

Maskell_Rascal_0-1638912519647.png

 

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

Mchappell67
9 - Comet

Hi - 

 

I came up with a single-tool solution:

 

Mchappell67_0-1638975498796.png

 

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

 

Kinetic_analytics
11 - Bolide

Awesome! 

Kinetic_analytics
11 - Bolide

On the Net workdays, I am getting 0 or 1. I can not see the exact difference number. 

Mchappell67
9 - Comet

 Hi - 


I'm not sure I understand your question.  When I run the workflow with the sample data that was attached, I see this:

 

Mchappell67_0-1639068346630.png

Let me know if I can assist.


Mark

 

Kinetic_analytics
11 - Bolide

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.

Mchappell67
9 - Comet

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 

Labels
Top Solution Authors