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

Formula to pull Active Employees or terminated within last 35 days

melissa_grit
5 - Atom

Hello! I have tried the following, but  I am getting terminated employees to pull through that are from old years.

 

[Employee Status] in ('Active', 'On-Leave') or ([Termination Date]<=Datetimeadd(DateTimeToday(),-1, 'month'))

and 

[Employee Status] in ('Active', 'On-Leave') or ([Termination Date]<=Datetimeadd(DateTimeToday(),-35, 'days'))

 

What am I doing wrong? 

4 REPLIES 4
Ritesh_Parmar
6 - Meteoroid

 Hi, can you share few sample records ?

 

melissa_grit
5 - Atom

See attached screenshots. Thanks!

Ritesh_Parmar
6 - Meteoroid

HI, this should work

[Employee Status]="Active" or ([Employee Status]="Terminated" and DateTimeDiff(DateTimeToday(),[Termination Date],"DAYS")<36)


melissa_grit
5 - Atom

Thank you! This worked!

Labels
Top Solution Authors