Alteryx Designer Desktop Discussions

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

Unique tool

Feras95p
8 - Asteroid

Dear all,

 

As shown in the picture below I want to use the Unique tool with ZD column but I have one problem, the unique tool will take the first value like in row number 8 and row number 11 the unique will take 8 while I want to take 11 because the status is 3.

 

I have 4 types of status 1,2,3 and 4. What I want is that if the ZD is duplicated and the status 1 with 2 or 4 chose the row with status 1. And if the status 3 with 2 or 4 take the row with status 3. Note that there is no chance to have  status 1 and  3 with the same ZD.

 

 

Any help in that please?

 

re.PNG

3 REPLIES 3
kelsey_kincaid
12 - Quasar

Hi @Feras95p ,

Any time you want to apply custom business logic a single tool will rarely do the trick. I'd recommend finding all statuses associated with each ZN. From there I'd use a formula to determine which status you want to keep and filter to records where the Status of that record matches the Status to Keep. I included a screenshot and example workflow - does this accomplish what you're looking for?

 

kayers_0-1590523564534.png

 

Feras95p
8 - Asteroid

Great work! Thank you, I was wondering if I can achieve the same of your output if I add a sort tool before the unique tool and sort the status manually like 1,3,2 and 4 and then adjust it ascending. But I don't know how can I sorting manually.   

kelsey_kincaid
12 - Quasar

Yep! If your business logic is a simple prioritization then you could use a custom sort order to put the record you want on top. This is probably the better approach than the one I initially proposed. That solution would look like this:

kayers_0-1590525116243.png

 

 

Labels