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.
SOLVED

Conditional IF formula with time variable

krishnagandhi
8 - Asteroid

Hi,

I have been trying to figure this out but no luck. I have date in the date timer format. I parse the time out to a separate column and i am trying to write a formula that says if the time is after 17:30  and terminal type is onsite then classify as night shift, else if time is before 17:30 and terminal type is onsite then day shift else 0. But i am getting an error. Is this possible?

krishnagandhi_0-1588260728821.png

 

2 REPLIES 2
AbhilashR
15 - Aurora
15 - Aurora

Hi @krishnagandhi, I put together a simple solution to help demonstrate your solution.

AbhilashR_0-1588261979893.png

I convert the DateTime field to just Time and then write a formula to identify Shifts

AbhilashR_1-1588262048367.png

Let us know if this works on your larger dataset.

 

cplewis90
13 - Pulsar
13 - Pulsar

Hello @krishnagandhi,

 

Similar to @AbhilashR, but a slight adjustment to the shift formula:

Timestamp.PNG

Labels
Top Solution Authors