Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

pick specific colum from the latest record

raheelfarooq
6 - Meteoroid

Hi, I am pretty new to alteryx ..

I want to pick the quantity delivered to each customer in their latest order.

 

My input is this:

id         qty    date

1001    50    1-Jan
1001    30    1-Feb
1001    65    1-Mar
1002    150    1-Apr
1002    80    1-May
1002    25    1-Jun

 

desired output is (add another column with the last qty value):

    id    qty    date            lastqty
1    1001    50    1-Jan    65    
2    1001    30    1-Feb    65    
3    1001    65    1-Mar    65    
4    1002    150    1-Apr    25    
5    1002    80    1-May    25    
6    1002    25    1-Jun    25    

 

Thanks

2 REPLIES 2
Kenda
16 - Nebula
16 - Nebula

Hey @raheelfarooq! I would use a Summarize tool to GroupBy id and get the Last qty. Then use a Join to add this column back to your original data. See the attached workflow. 

 

Hope this helps!

LordNeilLord
15 - Aurora

Hey @raheelfarooq

 

If you're data is always in the correct order you can use the Last function in the summarize tool:

 

Last.PNG

Labels