Alteryx Designer Desktop Discussions

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

Search each row for highest and second highest value, output column header and values

mcas1
7 - Meteor

Hi Community,

 

I am trying to achieve the following in my workflow: For every name, identify the winner and runner up, and how many pounds are associated with winner and runner up, and output the winner and runner up, as well as associated values. winner criteria needs to be flexible, but for now it is If #1 >= 2x #2 = No decision, ELSE decision. Below is an example.

 

Thanks very much in advance

 

Input:

 A1B2C3D4
John101620
Mary20 21 
Sam142403

 

Output:

 WinnerRunner UpValue for winnerValue for runner up
JohnD4A12010
MaryDecision Required   
SamC3A14014
3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @mcas1 

 

Here is a workflow for the task.

 

Input:

atcodedog05_0-1603210492239.png

Output:

atcodedog05_1-1603210518561.png

Workflow:

atcodedog05_2-1603210551525.png

Condition is set for each column in the formula tool.(i.e #1>= 2*#2)

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

 

 

mcas1
7 - Meteor

Thanks so much! This was very helpful

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @mcas1 

 

Cheers and Happy Analyzing 😀

Labels