We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Subtracting the number of days between transactions in a group

kayt93
5 - Atom

Hello! I am a very, very new Alteryx user. I need to figure out the number of days in between transactions, and these transactions need to be grouped by customer. Essentially, I need:

 

  • each transaction to be grouped by customer
  • the dates for the transactions in chronological order (lowest to highest)
  • the number of days between each transaction for each customer to be calculated (date math)

I have attached some sample data so you know what I am working with. Is something so complex possible in Alteryx? If not, what can I do to the data to make it more palatable for the system? 

 

Thank you in advance for any and all help you are able to give me. 

7 REPLIES 7

Hi @kayt93 

 

When you say transactions to be grouped by customers, we do have here 6 distinct customers. Am I reading the data correctly? or are you considering ABC0001 and ABC0002 as one customer and you need Alteryx to calculate the difference between 2003-10-02 and 2003-10-15, as an example? 

 

It will be helpful to share what the final output should look like so Community can help 🙂

Cheers!

apathetichell
20 - Arcturus

I went with an assumption that the customer code was a combination of customer code and the transaction number for that customer code. I created a new customer code based upon what matched and then used that for grouping in a multi-row formula... aka see attached.

kayt93
5 - Atom

Hi Christine! Yes, there were six distinct customers in the data set. Each customer would have multiple transactions.I now see that my original set was pretty confusing, so I have edited my data presented and included an output workflow of what I would like to see (3 customers with 6 transactions). Again, I am extremely new to alteryx, so I'm not sure if it could be presented in the format that I have provided. I really appreciate your help! 

kayt93
5 - Atom

Hi everyone! I have revised my data set and provided a solution as to what I would like to see. I am trying to edit the original post to include the revised data. 

apathetichell
20 - Arcturus

Have you looked at my workflow? That was my assumption in terms of how your data was structured. Do you need null()s? I have zero presently - but null(() could go in just as easily.

kayt93
5 - Atom

It worked perfectly!!! Thank you so so so so much! 

Maryfrances2024
6 - Meteoroid

Hello!

 

I've been searching for a similar outcome for so long, and I think this is the one I'm looking for.


But the thing is, I have different statuses for 1 unique code and if the status changes then the date goes back to day 1.

 

Additional notes are in the excel file. Please help me figure this out, this is the only remaining condition I need to add to my workflow.
I really can't figure out how to do this.

 

Thank you so much!!!

 

Labels
Top Solution Authors