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. 

6 REPLIES 6

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
19 - Altair

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
19 - Altair

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! 

Labels
Top Solution Authors