Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
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