Alteryx Designer Desktop Discussions

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

Calculate last week sales based on DATE

ErikH
7 - Meteor

Hi,

I have a huge CSV file where I have all the sales. The date formate is in DATE(dd.MM.yyyy). 

I would like to use Alteryx to find the sales last week (minus 7 days) on all SKUs I have and inject that in a new column. 

 

The data table setup

DATE | SKU | REVENUE | CATEGORY | GROUP | +++++ 

 

I've tried to search the forums, but have not found any topic that solves my issue.

 

Thanks in advance,

 

Best regards

Erik

 

 

4 REPLIES 4
Ladarthure
14 - Magnetar
14 - Magnetar

Hi, 

 

this is what I'd do based on what you say, you could also make it a bit better with using weeknumbers and calculate the sales per week and then join the datastreams.

 

hope it helped!

danrh
13 - Pulsar

I wasn't positive whether you mean the sum of sales over the last 7 days from today, a rolling sum of the sales over the last 7 days for any given date in your data, or the sales that occurred on the day exactly 7 days ago (it sounds like this one?), so I built out an example of each of the three. Take a look, see if these either fix your issue or at least get you pointed in the right direction.

ErikH
7 - Meteor

awesome guys, thank you!

 

Danrh, your solution was the easiest one and solved my issue 100% - thank you both for your time to help me!

ErikH
7 - Meteor

--

Labels