community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Applying Two Different Filter Rules by a Group

Highlighted
Bolide

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

Alteryx Certified Partner
Alteryx Certified Partner

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

Alteryx Certified Partner
Alteryx Certified Partner

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. 

Alteryx Certified Partner
Alteryx Certified Partner

photo finish, @CharlieS!!!

Bolide
Bolide

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.

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!

Alteryx Certified Partner
Alteryx Certified Partner

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

Bolide

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

Labels