Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

FILTER BASED ON A CRITERIA WITH SAME IDENTIFIERS - SOS318

giulianosua1
7 - Meteor

Hi Guys, 

 

I have a set of data that I want to filter based on the Desk, for example all the Fixed Income ones, but I also want to include the other leg which shares the same identifier but that could have a different Desk. How do I go about it?

 

NAMEIDENTIFIERDESK
JAMES123FIXED INCOME

ASHLEY

456FIXED INCOME
ALAN123EQUITY
JACK456QUANT
CHUCK987ALTERNATIVE
WILLIAM987ALTERNATIVE

 

Output based on the above criteria should be:

 

NAMEIDENTIFIERDESK
JAMES123FIXED INCOME

ASHLEY

456FIXED INCOME
ALAN123EQUITY
JACK456QUANT
7 REPLIES 7
ChrisTX
16 - Nebula
16 - Nebula

Use the Summarize tool, group by Identifier and Desk, and for Name try Action = First.

 

Chris

zajaccount
9 - Comet

Hi,

 

you could do this by setting a filter:

 

DESK = "FIXED INCOME"

 

then, select the identifier column and join it with the "False" leg of the filter. 

 

After this, union the "True" leg of the filter and the joined leg of the Join tool:

 

zajaccount_0-1588161089790.png

Please find the flow attached - let me know if this works.

giulianosua1
7 - Meteor

So I found a solution, not so clean but it works. 

 

I created a new column that uses an IF statement, If Contains(Desk, "QIS) then [Identifier] else "No" endif

 

Once this is executed I filter the identifier based on the results of the new column. Any better way to do it?

ChrisTX
16 - Nebula
16 - Nebula

Your initial question didn't mention the ability to base logic on a "QIS" value in the Desk field.  Can you provide all of your requirements, and update the sample input and expected output?

 

giulianosua1
7 - Meteor

Thanks Guys - already solved by using the workflow provided above!

giulianosua1
7 - Meteor

Thanks Zaj! this worked!

zajaccount
9 - Comet

Perfect, glad I could help 😉

Labels