We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Find Out Unique Value based on condition

sgaryali
8 - Asteroid

Hi

 

I want to find out unique value taking date and employee ID into consideration.

 

But out of duplicates rows I want only that row which has value in comment column not the empty one.

 

I can find out unique by the help of unique tool but not able to get it with one extra condition.

 

Attaching sample file for reference.

 

 

Thanks in advance.

5 REPLIES 5
CarliE
Alteryx Alumni (Retired)

@sgaryali 

 

What you will need to do is sort before using the unique tool -- make sure to sort comments descending to ensure the comment field with data in it is listed first. The FIRST unique value will be taken. This should solve the issue.

 

 

If this was helpful make sure to mark it as a solution. If I am reading this wrong, can you elaborate a little more?

 

 

Thanks,

Carli
sbatra116
8 - Asteroid

why not remove the rows which has NULL comments, then use the unique tool.

phottovy
13 - Pulsar
13 - Pulsar

Hi @sgaryali ,

 

I believe if you place a sort tool before your unique tool and set it up like this, it will keep the one with the comment. This would not work if there were multiple rows with comments though:

phottovy_0-1654700382094.png

 

 

 

IraWatt
17 - Castor
17 - Castor

Hey @sgaryali,

You can use this configuration with the summarize:

IraWatt_0-1654700425305.png

 

phottovy
13 - Pulsar
13 - Pulsar

@IraWatt ,

 

I never would have thought about the summarize tool for this but that's why the Alteryx Community is the best. So many creative ways to solve a problem

Labels
Top Solution Authors