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.

Using Conditional Formulae to Create Categories

sparshpankaj
7 - Meteor

Hello Everyone

I am extremely new in my analytics journey on Alteryx, and would love to seek help from you lovely folk. Here's my issue:

Task 21

Classify the orders into Lunch, dinner and others category

Lunch = 12 pm to 3 pm
Dinner = 7 pm to 12 am 
All other hours should be "Others"

 

The data I currently have has the following fields:

sparshpankaj_0-1618177557674.png


Please help me out, I am a fresh graduate and my employment depends on how I do in this training exercise 🙂

2 REPLIES 2
KaneG
Alteryx Alumni (Retired)

Hi,

 

You should be able to just do this in a formula tool. You can use an IF/THEN/ELSEIF/THEN/ELSE formula.

 

So,

IF [Time]>12 && [Time] < 15

THEN "Lunch"

ELSEIF [Time] > 19 

THEN "Dinner"

ELSE "Other"

ENDIF

 

 

Qiu
21 - Polaris
21 - Polaris

@sparshpankaj 

A sample dataset would be helpful for us to prepare a sample flow. 😁

Labels
Top Solution Authors