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 Cloud Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Cloud.
SOLVED

Remove rows with a higher value in a specific column

43e0a22239487a85233b
8 - Asteroid

For example I have the table below:

I want to create a recipe that will keep only the row with the lowest value in column C, so the result would be:

 

Any clue? thanks in advance

3 REPLIES 3
AMiller_Tri
Alteryx Alumni (Retired)

Hi @Gustavo Castanheira? , that's a great question.

I'd assume this table can have many different groups of values in columns A+B, and for each group, you'd like the minimum value in column C.

 

So, to do so - the most straightforward way would be to use the group-by transformation.

You can access it either through the toolbar:

Or through the drop-down menu of each column:

Or via the "new step"/"search transformation" buttons:

there you can search for "group by":

You'd want to group by the columns you're aggregating by (in our case, these are columns A+B), and the value to generate would be the desired minimum value of column C. So we'll be using the min() function.

 

This is how it would look like - and the preview here shows how the table is being changed to the desired output:

 

See that we chose the option for "as new table". If we would've chosen the "as new column(s)" option, the new aggregated value would just be added as a new column to the original table, like so:

 

I hope this helps.

Thanks,

Amit.

43e0a22239487a85233b
8 - Asteroid

It really helps a lot. Thanks Amit. God bless.

AMiller_Tri
Alteryx Alumni (Retired)

Pleasure's all mine =]