ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

IF Statement / Solution to my task

madslawton3
Meteoroide

Hello All!

 

I am trying to perform a lookup between two datasets and I think the IF function is what I am looking for; but I'm unsure.

 

Task:

My first data set contains names of employees terminated from Company X.

The second data set contains names of employees hired at Company X.

 

Thus, I am trying to compare to see if an employee was terminated and re-hired in the same year (i.e. name = right_name) and term date < hire date.

 

This is what I have put in to the multi-field formula tool, but its not working:

 

IF [IGG] == [Right_IGG] &&
IF [Termination Dt] < [Right_Eff date]
THEN "false positive"
ELSE "true term"
ENDIF

 

If anyone has a solution it would be greatly appreciated (:

4 RESPOSTAS 4
Thableaus
17 - Castor
17 - Castor

Hi @madslawton3 

 

IF [IGG] = [Right_IGG] AND [Termination Dt] < [Right_Eff date]
THEN "false positive"
ELSE "true term"
ENDIF

 

Would this work?

 

Cheers,

madslawton3
Meteoroide

It keeps popping up an error that says "at least one field must be selected". Not sure why that's happening

Thableaus
17 - Castor
17 - Castor
Use a Formula Tool instead of a Multi-Field formula Tool.
Cheers,
madslawton3
Meteoroide

Thank you so much!

Rótulos
Autores com maior número de soluções