community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

Retain the first value that comes when sorted alphabetically

Meteor

Capture.JPG

Consider rows 3 &4.

I have sorted alphabetically Column 'Date Code'. But I wanted to retain only one row say row 3 in this case. since it is the first row when Column 'Date code' is sorted alphabetically(Assume: Columns 'Code', 'Year' & 'Date' have same values).

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner
Hi!

Great question; this can be achieved with the sample tool.

You want the first N (n being 1 in your case), and then set the fields you mentioned as group by fields in the sample tool, this means it will take the first 1 record per unique combinations of values in those fields you check.

Ben
Alteryx Certified Partner
Alteryx Certified Partner
Ben is absopositively correct! The following is just meant to help others in the event that they want to know a subset of the row data.

If you use the summarize tool, you can group by code and date and the se one or more fields to use the FIRST function.

Cheers,

Mark
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Meteor

Perfect.Thanks BenMoss.

Meteor

Tried summarize tool too. Worked perfect. Thanks Marqueecrew.

Labels