Alteryx Designer Desktop Discussions

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

Need to count number of days considering the holiday dates in a different input data

Maharshishah
6 - Meteoroid

Hello,

 

I have a fields in my first data set which has counted the number of days from that event created lets call it "date 1". now i need to calculate the number of days in another column "date 2" removing the weekends and also the holidays.

 

In excel we used the formula of networkdays, where we subtracted the todays date with "date 1" value (todays date-date1) and then end date is todays date and the last logic of holiday list is pulled from another sheet in the excel. the calculation is based on that.

 

How do i implement this on alteryx?

5 REPLIES 5
caltang
17 - Castor
17 - Castor

NicoleJohnson's response here: https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Networkdays-in-Alteryx/m-p/709...

 

I used her method to get network days in my own workflow. 

 

You will need to have an Excel sheet referencing all the Public Holidays. 

 

Hope this helps!

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
binuacs
20 - Arcturus

@Maharshishah you can also find the macro for calculating the network days in the gallery

 

https://community.alteryx.com/t5/Community-Gallery/Network-Days/ta-p/1056599

Maharshishah
6 - Meteoroid

Thank you very much. Both the solutions were similar and it worked. 

 

Have 1 doubt - the logic for loop in generate rows work, but what should i do when the start date and end date are similar. It takes the count as 0 however I want it to take it as 1.

caltang
17 - Castor
17 - Castor

You can use a Formula Tool to use an IF Statement. If the Start Date = End Date THEN 1 ELSE [Count] ENDIF.

 

Of course, apply the Formula Tool to the field "Count". See if it works for you.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Maharshishah
6 - Meteoroid

Got the problem sorted. Thank you very much @caltang and @binuacs

Labels