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

Applying Two Different Filter Rules by a Group

smoskowitz
12 - Quasar

Hi All --

 

I have been struggling with how to apply two sets of rules to a particular column, and have had a bear of a time. Here is what I want to do.

 

Scenario 1: I created groups based on my information. The group is designated by the first column (Tile_Num).

2019-01-31_14-57-11.jpgIf you look at the column labeled Concat_Transaction ID -- three of the rows have data and three are null. For this group (and this instance_ I just want to keep the three rows with data (2017-Q2_10631). The ones with NULL can be discarded.

 

Scenario 2: For Tile_Num 68 - If the Concat_Transaction ID has no data in it, then just keep the first row of data.

2019-01-31_15-04-10.jpg

 

In this scenario, I would expect to just be able to return the first row listed.

 

I cannot for the life of me figure out how to write this filter. Data is attached.

 

Thanks for your help.

 

Seth

7 REPLIES 7
Nick612Haylund
10 - Fireball
10 - Fireball

Hey @smoskowitz 

 

There are more elegant solutions to accomplish this, but attached should get to what you're after, and hopefully provides a good walk through of the logic needed to accomplish this in the future.

 

Cheers,

Nick

CharlieS
17 - Castor
17 - Castor

I see a couple of steps that need to take place here: determine which course of action to take for that Tile_Num, then take the appropriate action.

 

Check out the attached workflow and let me know if you have any questions. 

Nick612Haylund
10 - Fireball
10 - Fireball

photo finish, @CharlieS!!!

jarrod
ACE Emeritus
ACE Emeritus

See the attached workflow. I'd first filter the records that have something in the field, then remove all other records that are part of that group (unjoined R side of join tool). After that, a sample tool will do the job for taking the first record of each group.

gene_denny
8 - Asteroid

This is one of my favorite things about both Alteryx and the Alteryx Community.  In less than 30 minutes, look at all the different solutions offered up for the same problem!

 

Love it!

Nick612Haylund
10 - Fireball
10 - Fireball

True that @gene_denny! An immeasurable advantage of using this tool vs. others, is the strength and engagement of the community :)

smoskowitz
12 - Quasar

I want to thank everyone for their help! I agree that this community is so awesome! 

Labels