We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Comparing Data from Two Columns

Luca_Bevilacqua
5 - Atom

Hi, first day using the software [sigh]

I'm trying to find a way to compare and filter data from two columns in one dataset. Basically, my excel formula would be something like =IF(P2-O3>90,"True","False").  

This is the syntax I’m trying to use. Any help would be appreciated.

Luca_Bevilacqua_0-1658548430346.png

Luca_Bevilacqua_2-1658548841268.png

 

 

 

Thanks!

2 REPLIES 2
binuacs
21 - Polaris

@Luca_Bevilacqua you can find the syntax in the below link

 

Conditional Functions | Alteryx Help

 

 

If you are trying to take the difference of Date fields then you should use the DateTime functions

 

DateTime Functions | Alteryx Help

 

 

 

binuacs_0-1658555742809.png

 

Hongsen_T
Alteryx Alumni (Retired)

@binuacs shared really good links which I still refer to often!

 

Thought to add something extra, sort of an "aha" moment I frequently observe for newer users. In your screenshot, I see that you have put the IF-ELSE statement into the FILTER tool. 

 

Actually, the FILTER tool simply needs an expression that can be evaluated as TRUE/FALSE. This means that something like [DT_EXE_SERV_CLEAN] > [DT_DOC_CLEAN] would work right away.

 

The other option which you thought of, using the IF-ELSE statement, would work as well. To achieve this, you could use a FORUMLA tool with the IF-ELSE statement, followed by a FILTER tool to filter by T/F.

 

Both methods work, it's a matter of preference and level of verbosity/clarity you would like in your workflow. Happy learning! 

 

Hongsen_T_0-1658725197209.png

 

Teo Hong Sen
Sales Engineer
Alteryx
Labels
Top Solution Authors