Alteryx Designer Desktop Discussions

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

Keep first row of each duplicate row?

Crispy131
8 - Asteroid

Hello,

 

I have data that looks like the following table. Note I've sorted the table by each column and the last column 'Number' in ascending order because I only want to keep that first number for every row where the year/month/country are the same. Basically like removing duplicates (excluding the Number column) and keeping the first row of each instance.

 

YearMonthCountryNumber
2021MAYUSA80
2021MAYUSA81
2022FEBITALY30
2022FEBITALY35
2022DECGERMANY115

 

So I want the output to look like this:

 

YearMonthCountryNumber
2021MAYUSA80
2022FEBITALY30
2022DECGERMANY115

 

any ideas please? I'm stuck after the sorting. 

 

Any help is much appreciated!

2 REPLIES 2
Felipe_Ribeir0
16 - Nebula

Hi @Crispy131 

 

The unique tool always keep the first row of the duplicated rows, so after sorting it, just use the unique tool selecting the correct columns and it will do the job.

 

Felipe_Ribeir0_0-1669938315984.png

 

Check out the official doc for more details about the unique tool: https://help.alteryx.com/20223/designer/unique-tool

 

Felipe_Ribeir0_1-1669938463570.png

 

 

Crispy131
8 - Asteroid

Awesome! My first time using this tool thanks!

Labels