The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Bringing Last Business Day Data

Kristie_Pires
8 - Asteroid

Hello all,

 

The data in our system is always one business day behind. To bring that data in, I have a formula to bring yesterday's data however it doesn't work for holidays. This is the formula I am currently using: 

Kristie_Pires_0-1667845685598.png

 

Yesterday formula: If datetimeformat(DateTimeToday(),'%a')='Mon' then DateTimeFormat(DateTimeAdd(DateTimeToday(),-3,"days"), "%Y-%m-%d") else DateTimeFormat(DateTimeAdd(DateTimeToday(),-1,"days"), "%Y-%m-%d") endif

Last Bussiness Day Formula: IF [Yesterday]=[Processed Time] THEN "Last BD" ELSE "Exclude" ENDIF

 

After using the two formulas, I filter only "Last Business Day" to get yesterday data. However, if it is a holiday, I have to manually bring the data. Is there any way I can dynamically bring the data? 

1 REPLY 1
marcusblackhill
12 - Quasar
12 - Quasar

Hi @Kristie_Pires,

 

That is always tricky to solve. The most common solution is as you build a dataset in a text input with all holidays first.

 

To keep your current logic, you could add a find/replace or join tool after your formula to bring a flag in case the day "Yesterday" date is a holiday and add a new formula tool to adjust the date in case it is a holiday.

 

Labels
Top Solution Authors