Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Announcement | We'll be doing maintenance between 9am-11am MT on Saturday, January 25th, which may impact your experience. Thanks for your patience as we work on improving the community!

Retain the first value that comes when sorted alphabetically



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).

Alteryx Certified Partner
Alteryx Certified Partner

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.

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.


Alteryx ACE & Top Community Contributor

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

Perfect.Thanks BenMoss.


Tried summarize tool too. Worked perfect. Thanks Marqueecrew.