Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Grouping + Condition Check + Output

surajmthomas
8 - Asteroid

I have a data set as below. I would basically need to check the first row of every unique LEID and see if the Exit column has a value "y". I would need to filter out such rows first.

 

1) I have used the Tile Tool to group by LEID and then used the Filter Tool to get only the records that match the criteria TileSequenceNum = 1 AND Exit = 'y'

2) I have used the Join Tool to join the output of Step 1 with the original input data set to get back the other rows of the above matched criteria.

3) From Step 2 I would need to arrive at an output where I would need to return only if the Exit value for a LEID is 'y' and the other Exit values of the same LEID is either "Null" or "n"

 

 

 

surajmthomas_0-1626767447136.png

 

 

Desired Output is 

 

surajmthomas_1-1626767486952.png

 

 

4 REPLIES 4
Ladarthure
14 - Magnetar
14 - Magnetar

Hi @surajmthomas,

 

I draw a solution for your problem, one way to do it would be to do "tops", like if there is y it's ok for each row, then getting the max for each LEID, and finaly filtering the LEID which answers the differents conditions. Then you can join with original data to keep only what you need. Find the workflow attached!

Jean-Balteryx
16 - Nebula
16 - Nebula

Hi @surajmthomas ,

 

Here is a workflow that produce your desired output !

atcodedog05
22 - Nova
22 - Nova

Hi @surajmthomas 

 

Here is my take on the usecase

 

Workflow:

atcodedog05_0-1626769716987.png

Above branch is checking is seq=1 and exit='y'. Lower branch is get getting count of 'y' for LEID and checking is count=1. If seq=1 and exit='y' and count of 'y'=1 then first row is 'y' and only one 'y' exits which is in first row. Taking common LEID amongst both using join tool.

 

Hope this helps : )

 

surajmthomas
8 - Asteroid

Three different ways to approach the same problem. Awesome thank you Alteryx Geniuses .. @Ladarthure @Jean-Balteryx @atcodedog05 

Labels