Alteryx Designer Desktop Discussions

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

Unique tool - strange results

Grzegorz
7 - Meteor

Hi,

I have unique tool set up on two columns sequence number and count.

 

Few steps earlier there is a summarize tool with all (many) columns set up as 'group by' and additionally column sequence number again as 'count'. This was just to calculate the number of unique rows through all the columns.

Final result is to say 'the number of unique rows with this sequence number is [count]'.

I have so many columns that making the manual concatenation would be a nightmare.

Then I put select to have only these two columns and put unique on them. 

 

Grzegorz_0-1593790880778.png

Can anyone explain me the logic why GPMO-0510 is in two rows with 1 and 2 count instead of just appearing once with count = 2 ?

4 REPLIES 4
AngelosPachis
16 - Nebula

Hi Grzegorz,

 

The unique tool is going to look for all unique combination of columns Sequence number and Count if you have both tick boxes checked in the configuration window. If you uncheck one of them (say Count) then you will get all unique values for Sequence number. 

 

When you have two Sequence numbers with different counts, the unique tool is going to return only the first value and neglect the rest.

 

If you only want to keep the Sequence number with the highest number, you can use a Summarize tool, Group on Sequence Number and get the Max of Count. Please find attached a mock workflow.

 

Hope that helps, let me know if anything is still unclear

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @Grzegorz,

 

Can you attach the output you're getting so we can take a look? It could be caused by leading/trailing whitespace or even perhaps non-printable characters?

 

Regards,

Jonathan

Cndro_Consulting
8 - Asteroid

This is correct @AngelosPachis@Grzegorz Hope you understand now?

grazitti_sapna
17 - Castor

Hi @Grzegorz , I guess when you used summarize tool and group by there is a possibility that the sequence number GPMO-0510 have different values in other column that is why you are getting two different rows with GPMO-0510 and different count. In order to append it to single row either remove the group by from the column that has different value or remove the count column then apply unique tool. I hope this will work.

Sapna Gupta
Labels