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

Find the last row with in the same ID

Manjari
8 - Asteroid

Hi All, 

 

Requesting help in finding the last row with in a ID

sample data: 

User IDFavorites
1001Apple 
1001Mango
1001Apple
1002Jack fruit
1002pineapple
1002Apple
1002Mango

 

I would like to filter out only the last row like the below

1001Apple
1002Mango
7 REPLIES 7
Zas3NfkB
7 - Meteor

Hi @Manjari  you can do that using the sample tool with the below configuration. Selecting the last n (in this case 1) and grouping by ID

 

Zas3NfkB_0-1593532630431.png

 

Manjari
8 - Asteroid

Thank you @Zas3NfkB 

This worked great, after implementing this into my original data set i realized I want the output to be like this:

User IDFavoritesLast row status
1001Apple  
1001Mango 
1001AppleLast row per ID
1002Jack fruit 
1002pineapple
1002Apple 
1002MangoLast row per ID

 

Sample filters the rest of the columns that I need. apologies for not explaining well.

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @Manjari,

 

I think this is what you're trying to achieve?

 

Input:

 

Jonathan-Sherman_1-1593543852615.png

 

 

Output:

 

Jonathan-Sherman_0-1593543835977.png

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

 

chinu267
8 - Asteroid

See the attached solution if it helps you achieve what you need. Mine is Alteryx 2020.2 and if yours is lower, please open the YXMD file in notepad++ on the top change the version to whatever is yours, save and reopen to run

 

chinu267_0-1593545156093.png

 

Manjari
8 - Asteroid

Thank you @chinu267, this really helped me deliver a deliverable today. 

Thank you for attached workflow 🙂

chinu267
8 - Asteroid

Absolute Pleasure Manjari.

Please mark this solution as solved for me.

Manjari
8 - Asteroid

Thank you @Jonathan-Sherman your solution worked like a charm. 

Thank you for taking out time 🙂

Labels