Alteryx Designer Desktop Discussions

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

Checking conditions of two fields

alkafalhas
7 - Meteor

Hi 

 

I'm trying to do a very simple comparison but couldn't think of an efficient tool to do it.

 

As an example, if [Items] = WEATHER01, [value] <= 25, then [Conditions agree] = yes.

 

Below is sample output expected.

 

ItemsValueConditions agree?
WEATHER0120Yes

 

Thank you in advance

7 REPLIES 7
Luke_C
17 - Castor

Hi @alkafalhas 

 

A formula tool with an if statement will get this done. See below and attached

 

Luke_C_0-1623075611342.png

 

Emil_Kos
17 - Castor
17 - Castor

Hi @alkafalhas,

 

I have a feeling that you have more condition for different items:

 

Emil_Kos_0-1623075801223.png

 

The output:

 

Emil_Kos_1-1623075838504.png

 

alkafalhas
7 - Meteor

Hi @Luke_C 

 

What if i have a multiple items? should I add same formula by using the (+) button in the formula tools? or you have better ideas?

Luke_C
17 - Castor

Hi @alkafalhas 

 

I would suggest implementing something like @Emil_Kos suggested, a mapping table for items and their thresholds. 

Emil_Kos
17 - Castor
17 - Castor

Hi @alkafalhas,

 

The mapping table is always easier to maintain in a long run. So if possible I would almost always suggest using mapping tables instead of the formula tool. 

alkafalhas
7 - Meteor

Hi @Emil_Kos 

 

Thank you for helping so far.

 

If I have a multiple items with different conditions, how can i address it?

Example below:

 

ItemsValueConditionsOutput
WEATHER0120Yes, if value<=20yes
WEATHER0220Yes, if value<=10No
WEATHER0340Yes, if value<=40Yes

 

 

Emil_Kos
17 - Castor
17 - Castor

Hi @alkafalhas,

 

Here you go:

 

 

Emil_Kos_0-1623079067342.png

Output:

 

Emil_Kos_2-1623079100727.png

 

Labels