Hi Guys,
Would someone help me how to get the date by 2 days but will not count weekends (Saturday and Sunday) as well as US holidays?
For example my date is September 1, 2023 (Friday)
Sept 2 and 3 are weekends so it will not be included in the count
Sept 4 is US Labor Day
So if I am going to add to days, the date should be September 6, 2023.
Please help me derive the formula.
Thanks and hope to hear from someone.
Kamen
Solved! Go to Solution.
@KamenRider are there any other countries holidays that need to be excluded? I am assuming Labor Day is the US' Labor Day.
@KamenRider
I went to this site and download the list of US holidays for 2023.
Then basically we will generate a fairly large range dattes from specified date then filter out weekends and Holidays.
Hope this will help.
@KamenRider here is another approach.
The analytic app solution generates a list of holidays for a user-determined number of years (first section). Then, in the second section, I use the URLs created in the first section to bring in all holidays for that country over those years. Third, and finally, I test the date against whether we are on a weekend and there is a holiday. If those conditions are not met, I add two days to the Test Date.
Hope that helps you out! :)
@KamenRider Not a problem. If you need additional countries, I have preloaded the app solution I posted above with the list of countries that should work for the app. Would require some minor configuration (another Drop-Down tool for country selection).
@KamenRider it could be a number of different reasons. There is pretty detailed Alteryx Community that is posted here:
https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Error-transferring-data-Failur....
Alternatively, I can run the number of years for the US for the next N number of years for you, switch the input to a yxdb for the holidays in that period, and then remove the JSON parse section. Dealer's choice.
Hi @rzdodson
I suspected because of the external links. Our company does not allow external links. Is there any other way you could modify the workflow?
What is JSON parse section? I apologize, I am not much well verse in Alteryx, still learning.
Thanks,
Kamen
Hi @Qiu
Your workflow seems to get the logic of my problem. May I know why did you use "add seven days' in the formula instead of 2 days as per my requirement?
Need to know so I can also explain it to my colleagues.
Thanks,
Kamen