Alteryx Designer Desktop Discussions

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

IF Statement / Solution to my task

madslawton3
6 - Meteoroid

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 REPLIES 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
6 - Meteoroid

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
6 - Meteoroid

Thank you so much!

Labels