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

Dynamic Filtering

nicktekippe
8 - Asteroid

What I need to do is filter the below data to the highest FM and FY for each group of supplier numbers and filter out the other rows. The data has a lot of different suppliers with multiple lines of data. For example the supplier number 1687 I would only want to keep the row with FY 2021 & FM 10.

 

nicktekippe_0-1660937928701.png

Any help would be appreciated!

 

7 REPLIES 7
jzkyburz
8 - Asteroid

Have you tried using the Sample tool? Select 'First N rows', set N = 1, and then Group by supplier_number. You'll also need to place a sort tool in before taking the samples to ensure you're selecting the highest FM & FY:

 

jzkyburz_0-1660939866963.png

 

Qiu
20 - Arcturus
20 - Arcturus

@nicktekippe 
We can use the summarize tool as well
but I do have one question.
Say for one supplier, there is month 11 for 2021, but here is also month 12 for 2022. So what would be answer then?

0821-nicktekippe.PNG

Emmanuel_G
13 - Pulsar

Hi @nicktekippe ,

 

Find attached an easy way to do this.

Emmanuel_G_0-1661086253316.png

 

nicktekippe
8 - Asteroid

@Qiu The result for that would be the month 12 for 2022. For any example it should be taking the most recent data.

nicktekippe
8 - Asteroid

@Qiu & @Emmanuel_G  This will work to filter it down but how to I include the rest of the columns in the data as well? This method gets it filtered to the correct FM/FY but I need the rest of my columns to come through unchanged as well.

jzkyburz
8 - Asteroid

@nicktekippe , did you try the sample tool to see if that meets your needs? That will keep all columns in the mix.

Qiu
20 - Arcturus
20 - Arcturus

@nicktekippe 
Hope I get you correctly.

0821-nicktekippe-r1.PNG

Labels