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

Help: Applying formula over multiple fields

Eug_teng
7 - Meteor

Hi all,

 

I have a problem which I am unable to figure out. I have an input which shows different scenarios (E.g Scenario A, Scenario B) and the respective probability of success (See example input below)

 

Scenario A_SuccessScenario A_FailScenario B_SuccessScenario  B_FailScenario C_SuccessScenario C_Fail
0.990.010.940.060.120.88

 

I have to create an additional review column for each scenario such that: (See example output below)

  • If probability of success or probability of failure >= 0.9, review = good
  • If probability of success or probability of failure < 0.9, review = bad
Scenario A_SuccessScenario A_FailScenario A_ReviewScenario B_SuccessScenario  B_FailScenario B_ReviewScenario C_SuccessScenario C_FailScenario C_Review
0.990.01good0.940.06good0.120.88bad

 

How do I go about doing this? I have approximately 50 scenarios! Is there a better way to do it instead of creating 1 formula per scenario?

 

Thank you for the help!

3 REPLIES 3
Qiu
21 - Polaris
21 - Polaris

@Eug_teng 

Hope this is what you need.

Capture05.PNG

AngelosPachis
16 - Nebula

Hi @Eug_teng ,

 

You can achieve that by using a multi-field formula tool with an If statement, checking if the value for either the success or fail fields is greater than or equal or below 0.9

 

AngelosPachis_0-1611566177959.png

 

So you don't have to go through all 50 fields and selecting manually on which fields you want to apply the formula, you can use a dynamic select tool before the multi-field formula tool, to select only the fields that contain Success or Fail in their names, and then apply the multi-field formula by selecting all available fields.

 

Hope that helps, let me know if you have any questions on the workflow.

 

Regards,

 

Angelos

 

Eug_teng
7 - Meteor

Thank you both!

Labels
Top Solution Authors