Alteryx Designer Desktop Discussions

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

Formula to assign value on first working day of month

DataIsFun
Meteoro

Hi Everyone,

 

I'm currently struggling to put a formula together that will assign a value to my data based on the day and time my WF is executed. Essentially on the first working day of the month i.e. 2022-12-01 for December I need to assign the value completed if the wf is run between 09:00:00 and 10:00:00.

 

I hope this makes sense as my English is sometimes not the best.

 

Many thanks to anyone who takes the time to reply in advance. 

3 RESPUESTAS 3
ShankerV
Cástor

Hi @DataIsFun 

 

Can you please explain in Input, Logic to be applied and Output expected.

 

So that its easy for me to get the output, by building the workflow.

 

Many thanks

Shanker V

DataIsFun
Meteoro

@ShankerV currently I have 5 separate formulas to calculate the deadlines but it's not robust enough as it doesn't assign a value So I essentially would like to be able to use one formula instead of 5  

 

DataIsFun_0-1671014838945.png

 

DavidSkaife
Púlsar

Hi @DataIsFun 

 

Here is a workflow that you can use to incorporate into your existing, which works out if the first day of the month is a working day, and if the workflow has ran between 9 and 10:

 

DavidSkaife_0-1671016723936.png

 

First Formula tool works out the first date in the month for your 'Enddate', and also what day of the week it is.

DavidSkaife_1-1671016752058.png

 

Next it filters on the day being Sat or Sun, if this is false then it performs the following checks; does the 'Enddate' equal the 'First of the Month' date, is the time now (i.e when the workflow is ran) between 09:00:00 and 10:00:00, and finally creates an output field of Completed if it passes both these checks.

 

DavidSkaife_2-1671016823801.png

 

If the Day is a Sat or a Sun then it adds 2 or 1 day to the 'First of Month' and performs the same checks as above

 

DavidSkaife_3-1671016952249.png

 

Hope this helps and you can incorporate it into your workflow - let me know if you have any questions!

 

Etiquetas