Alteryx Designer Desktop Discussions

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

Alteryx Filter and Join

Sangz
6 - Meteoroid

I have a table below. I need to get an output of all the Recipients where Agreement Status <> Current Agreement and only if that Recipient did not have atleast 1 Current Agreement.  

RecipientAgreement StatusAgreement Number

12345

Past Agreement99999999
12345Current Agreement88888888
12345Past Agreement77777777
67890Past Agreeement66666666
67890Past Agreement55555555

 

Hence the below output should be only the below (because Recipient 12345 had 1 Current Agreement):

RecipientAgreement StatusAgreement Number
67890Past Agreeement66666666
67890Past Agreement55555555

 

I tried it by using  Left Join on the True and False of the applied Filter, but this seems to not show me Recipient 67890 at all. Please help

Sangz_0-1614511423648.png

 

9 REPLIES 9
Emil_Kos
17 - Castor
17 - Castor

Hi @Sangz 

 

i dont have access to my PC but did you checked If you dont have any extra spaces.

 

maybe you need to use cleansing tool to make the data in line with each other.

Sangz
6 - Meteoroid

@emil_kos,

The Past Agreement / Current Agreement is anew vaiable that is handled in the formula, so no chances for an extra space to come in right? Is there something wrong in the logic applied of the Join?

danilang
19 - Altair
19 - Altair

Hi @Sangz 

 

You can accomplish it like this. 

 

danilang_0-1614512354260.png

 

Count number of each kind of status for each recipient.  Use a filter to find the recipients with current agreements.  Join to your input data on Recipient and take the L output of the join, since you want to exclude those with a current status

 

BTW.  @Emil_Kos was correct, even without his computer!. In the words of Darth Vader "Impressive...Most Impressive"  Your table has "Current Agreement" with a space and the filter is [AgreementFlag] != "CurrentAgreement"(No Space).  Adding the space in the filter criteria, makes the logic work for your sample data

 

Dan

Emil_Kos
17 - Castor
17 - Castor

Hi @danilang,

 

my first check when the join isn't working is making sure that they are all in the same format 😀

This time it was related to formula and it is funny that it was at least partially right. 

Sangz
6 - Meteoroid

Thank you @Emil_kos & @danilang , However that was a typo when i typed my query, i can confirm that my table has no space in CurrentAgreement. Im unable to understand why the left join is not working as expected. Any other tips you can provide me please?

 

I need to check if a Recipient has a missing Current Agreement in place. What i am doing is attached in the workflow.

ecipientAgreement StatusAgreement Number

12345

PastAgreement99999999
12345CurrentAgreement88888888
12345PastAgreement77777777
67890PastAgreeement66666666
67890PastAgreement55555555
67890FutureAgreement44444444

 

Hence the below output should be only the below (because Recipient 12345 had 1 Current Agreement):

RecipientAgreement StatusAgreement Number
67890PastAgreeement66666666
67890PastAgreement55555555

 

I tried it by using  Left Join on the True and False of the applied Filter, but this seems to not show me Recipient 67890 at all. 

Emil_Kos
17 - Castor
17 - Castor

Hi @Sangz,


I think the output from your data should be:

 

Emil_Kos_0-1614531556135.png

 

You are attaching a workflow but it will not work for us as we don't have the underlying data.


The only difference between the solution that was sent by @danilang is the way that you connect the data:

 

Emil_Kos_1-1614531725367.png

 

If this will not help can you send us this workflow with sample data inside thanks to that it would work for us and we could take a look how what is the root cause of it. 

 

Emil_Kos
17 - Castor
17 - Castor

Hi @Sangz,

 

Please also use the data cleansing tool on the recipient column as I have a feeling one of the positions might have some extra space etc

 

Copy-paste the data to excel and try to do a vlookup. Check if it will work. 

Sangz
6 - Meteoroid

Thank you @Emil_Kos for the suggestion. Yea it makes sense what you have suggested. I have tried it out and seems to look promising. But going to do some more checks with a manual pivot to compare my result. Thanks for the swift reply! will keep you posted.

 

Thanks @danilang for your suggestions and quite support too! Much appreciaied.

Emil_Kos
17 - Castor
17 - Castor

Hi @Sangz,

 

if you need anything else please let me know!

Labels