Alteryx Designer Desktop Discussions

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

nth Order tool

rmwillis1973
8 - Asteroid

Hi,

 

Just a quickie - how do i create a field which calculates the nth Order (1st, 2nd, 3rd etc) for a particular customer.

 

I have Customer No, Order Date & Order No. fields in my data.

 

i'm sure it is very easy, but can't find a solution on the forum.

 

Thanks,

 

Richard

5 REPLIES 5
JohnJPS
15 - Aurora

Could you select just the Order Date and Order Number; Sort on the Date, then add a RecordID?  The RecordID should then serve as a counter for the orders.  [EDIT: or to reset for each customer... Michael and James' answers have that.]

rmwillis1973
8 - Asteroid

I could but i want to re-set the nth order each time there is a new customer (to get the nth order for each customer).

 

Thanks

michael_treadwell
ACE Emeritus
ACE Emeritus

Use the Multi-Row Formula tool to create grouped counts

jdunkerley79
ACE Emeritus
ACE Emeritus

you'll have to use a multi-row formula tool grouped by customer creating a new field of RecordID

 

Simple formula of :

[Row-1:RecordID]+1
DultonM
11 - Bolide

Hi rmwillis1973!

 

Do you want just a row per customer with their latest order? If so, Sort by Customer and then Order Date. Then use a Summarize tool to "Group By" on Customer and "Last" on Order#

 

If you want a count of the number of orders they have, you can also add a "Count" on Order# to the Summarize tool!

Labels