Alteryx Designer Desktop Discussions

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

How to retain only the latest selling line item row with a quantity of 1 in Alteryx

thameemi
5 - Atom

I am an Alteryx user, I have scenario where I have a Product ID (Vehicle ID Number), when sale happens it will show quantity as 1, when the sale cancellation happens it reports as -1. I want to retain only the latest selling line item, latest date and latest Billing Number where the quantity should be 1. Help me how to build this logic in Alteryx.

1 REPLY 1
Prometheus
12 - Quasar

@thameemi I added a few lines of data to make sure the logic worked. Then I summarized the data by grouping by VIN and getting the Max_Billing Date. After that, I joined the original data to the summarized data on VIN Number->VIN Number and Billing Date->Max_Billing Date. After that, I filtered out any records where Qty does not equal 1. Is this what you're looking for?

More Data.PNG

Max Billing Date.PNG

VIN and MaxDate.PNG

Qty 1.PNG

Labels