Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Working Date + Holiday date

AshishAgarwal
8 - Asteroid

Hi Team,

 

I want to get dates for Working  + Holiday dates.

 

I have list of Japan holidays which I can provide as input file.

 

So I want Alteryx to identify below working date:

1. Working date before Japan Holiday / weekends and Japan Holiday dates.

2. Working date after Japan Holiday and weekends

 

SceanrioHolidayResult
1MondayFriday + Monday
2Monday + TuesdayFriday + Monday + Tuesday 
3FridayThursday + Friday
4Thursday + FridayWednesday + Thursday + Friday
5Monday + Tuesday + WednesdayFriday + Monday + Tuesday + Wednesday
6Wednesday + Thursday + FridayTuesday + Wednesday + Thursday + Friday
7TuesdayMonday + Tuesday
8WednesdayTuesday + Wednesday
9Friday + MondayThursday + Friday + Monday
10SundayFriday
11SaturdayFriday
12Monday & WednesdayTuesday + Wednesday
13Friday & TuesdayMonday + Tuesday

 

I dont want to use Python in Alteryx.

 

Hence is it possible to derive such behavior using different tools?

 

Regards,

Ashish

9 REPLIES 9
Yoshiro_Fujimori
15 - Aurora
15 - Aurora

@AshishAgarwal 

Could you show us a sample input / output data to understand your requirement?

KGT
13 - Pulsar

Take a look at the attached.

From a list of the dates for the year with the PH attached (Generate Rows), cut the Saturday/Sunday with a DateTime Formula (DateTimeFormat([Date],"%A")) and filter, then multi-row to tag the row before and after.

aatalai
15 - Aurora

@AshishAgarwal this blog might help

dreldrel
8 - Asteroid

Maybe you could use a download tool to get Japan holiday from a public api, then use the date time function in the formula tool to calculate
https://holidayapi.com/countries/jp-13/2025

AshishAgarwal
8 - Asteroid

I am trying to correct attached workflow to get proper date.

Sorry, above suggestion is not working for me.

KGT
13 - Pulsar

You can enter this into the Multi-Row Formula (28) at the bottom of your canvas. I sorted by date before the Multi-row as well.

 

IF !IsNull([Holiday Dates])
THEN [Holiday Dates]
ELSEIF !IsNull([Row+1:Holiday Dates])
THEN "Day before " + ToString([Row+1:Holiday Dates])
ELSEIF !IsNull([Row-1:Holiday Dates])
THEN "Day after " + [Row-1:Holiday Dates]
ELSE Null()
ENDIF

 

Otherwise, you can put a record ID on before the join, take the joined data, add/minus one to the recordID and join again... but it's not as nice.

AshishAgarwal
8 - Asteroid

@KGT I got below result with that logic when I run with date of 22nd Sept

AshishAgarwal_0-1759310163133.png

However I wanted output only 22 Sept.

When I run with 19th Sept than I want result as 19, 18 & 17 sept only.

KGT
13 - Pulsar

So you want the holiday, and the day before, but not the day after? So point 1 of your question, and not point 2? Just delete one of the ELSEIF clauses.

Imaizumi
8 - Asteroid

I was not able to recreate Scenario 12 and 13, but I think from my workflow you can create your desired output for Result
Find Holiday dates and period.png

I hope this will be helpful

Labels
Top Solution Authors