Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
We’re experiencing technical issues with our vendor that are affecting license activations for Designer Desktop. We don’t yet have an estimated resolution time. We apologize for the inconvenience and will share updates as we have them.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Min Function

jonathanzadeh
7 - Meteor

Hi Guys,

 

I have a sample of data 3 columns. One contained a ID, one containing a "variance" and one containing a price. One ID can have multiple variance and price associated with it. What i would like to do is, select the ID with the smallest variance. However, one ID can multiple variance which are the same, so the next criteria for the selection is the one with the smallest price. Hence, is there a way to select the min variance, followed by the min price for that variance?

 

See Example:

ID     Variance       Price

1           3                 $1

1           2                 $3

1           2                 $6

2           1                 $1

2           1                 $3

2           3                 $6

 

So in the above case, for ID "1" the selection will take the smallest variance and then select the smallest variance with the smallest price. Hence ID 1 with a variance of 2 and price of 3 will be selected. Any way to do this? 

2 REPLIES 2
patrick_digan
17 - Castor
17 - Castor

@jonathanzadeh Use a sort tool (ascending by Id, Ascending by variance, Ascending by Price in that order) and then a unique tool with ID selected. 

mceleavey
17 - Castor
17 - Castor

@jonathanzadeh,

 

No problem.

Solution attached.workflow.PNG



Bulien

Labels
Top Solution Authors