Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Retain the first value that comes when sorted alphabetically

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

4 REPLIES 4
BenMoss
ACE Emeritus
ACE Emeritus
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
MarqueeCrew
20 - Arcturus
20 - Arcturus
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 restart. Order shall return.
Please Subscribe to my youTube channel.
Sethu
7 - Meteor

Perfect.Thanks BenMoss.

Sethu
7 - Meteor

Tried summarize tool too. Worked perfect. Thanks Marqueecrew.

Labels