Alteryx Designer Desktop Discussions

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

Going to a Monday id the DOW is Fri ,Sat or Sun

Deano478
11 - Bolide

Hi Everyone,

 

I hope everyone had a lovely Christmas and will have a blessed new year. The issue I'm struggling with is basically If the day of the week is Friday I want to be able to skip ahead to 10:00am on the next Monday and then repeat this process if the day is Saturday or Sunday. 

 

I have no idea if that's actually possible but if it is any help or guidance would be greatly appreciated many thanks in advance to anyone who sees this.  

 

 

6 REPLIES 6
DavidSkaife
13 - Pulsar

Hi @Deano478 

 

It's possible to do, but can you provide a bit more context for your specific use case?

Deano478
11 - Bolide

hey @DavidSkaife this particular use case relates to Monthly deadlines so essentially I need to run this WF on the first working day of each month at 10:00am, 12:00pm and 2:00pm and if its run at 10 its deadline 1, 12 deadlines 2 etc.. I probably didn't explain myself very well at all looking back on my  question now. My apologies for that  

Christina_H
14 - Magnetar

Here's a workflow that'll take the date, check what day it is, then move Fri/Sat/Sun to the following Monday leaving all other dates the same.  Hopefully you can adapt it to your use case.

Christina_H_0-1672826754159.png

Deano478
11 - Bolide

Hi @Christina_H thank you for our input i'll infidelity look at what you have and give it a whirl to try and do what I'm trying to do 

Deano478
11 - Bolide

@Christina_H @DavidSkaife I appreciate both of your inputs I found a way to workaround the days and just focus on the specific time frames instead by using a rather annoying formula 😂. I attached the formulas in case it might be of any interest to you guys or anyone else in future. 

 

 

 

 

Christina_H
14 - Magnetar

@Deano478 Here's a quick simplification of your formula to make it less annoying!  You could also drop the calculated fields for DateTimeNow and DateTimeToday (replace the field in the calculation below with the DateTimeNow formula instead)

 

Switch(DateTimeHour([DateTimeNow]),"Outside deadline hours",12,"Deadline 1",9,"Deadline 2",14,"Deadline 3",8,"Deadline 4")

 

One slight downside is that it won't include the final minute included in yours, the times run from e.g. 12:00 to 12:59 rather than 13:00.

Labels