Free Trial

Alteryx Connect Discussions

Find answers, ask questions, and share expertise about Alteryx Connect.
SOLVED

Date Field - Differences between records

pliskers
7 - Meteor

I have a data set containing daily sales for individual stores.  The dates are in a single field, and for any store, on each date a sale occurred I need to calculate the number of days that passed between the date of that sale and the most recent previous date on which a sale occurred.  So, for a store that has a sales record on April 27 and another on April 30, I need a field within the April 30 record, showing that for that sale, the most recent preceding one occurred 3 days prior.

 

Not sure how to approach this.  The sorting by store is the easy part, but how does one capture the date value for the same store in a different record?

 

Any ideas, please?

2 REPLIES 2
JarekSkudrzyk
11 - Bolide

@pliskers hi, to use information from different row you need to use "multi-row formula" tool
in case you need further assistance please let me know

pliskers
7 - Meteor

Thank you!   I'm aware of the tool but haven't used it yet.  I'll check it out.