Alteryx Designer Desktop Discussions

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

Is it possible to add start of the week date on excel file using the available tool?

Onemajor
7 - Meteor

Let's consider there is sales data that I download each week on Monday and only has two column.  Each week I have to open file and add start week date manually. 

Here is the data that I get: 

 

Productsales
A$100
B$120
C$500
D$300
E$130

 

Output that I am looking for: 

 

I wanted to achieve the following table each Monday where the Start Week date is added as new column for entire year of 2024.

 

For the first the week of 03/04/2024 to 03/10/2024, I am trying to get following table: 

 

companysalesStart Week Date
A$2003/4/2024
B$6003/4/2024
C$1003/4/2024
D$1503/4/2024
E$1203/4/2024

 

For the Week of 03/11/2024 to 03/17/2024. I am trying to get following table: 

 

companysalesStart Week Date
A$3003/11/2024
B$2003/11/2024
C$1003/11/2024
D$3003/11/2024
E$5003/11/2024

 

These two output are separate file, which is stored in a folder then I run workflow to read each file. 

13 REPLIES 13
nagakavyasri
12 - Quasar

@Onemajor One way of doing:

 

Screenshot 2024-03-08 150643.png

apathetichell
18 - Pollux

Reading this - I think you want Alteryx to inherrently know which file corresponds to which week (ie 3/4 start vs 3/11 start). that may be possible - but not with the data you've provided. If that is your expectation - is there a syntax to the filenames which would explain which file is which? Is there a starting file? 

Onemajor
7 - Meteor

Yes, I want to know Alteryx that the file that I have provided corresponds to the week and then add week start date as new column for that particular file. For example: I got input file now I want output1 that has new column called start week date as 03/04. Next week I will get another input file again add column called start week date as 03/11. In similar way keep adding start week date for rest of the year, once I get the input file. Goal here is to  add start week date column for each week for each file but other data remains the same in input file. I have attatched file, hope this helps. 

Onemajor
7 - Meteor

thank you for your response, but this doesn't add new column named start week date to the file. This formula is just extracting start week date. 

apathetichell
18 - Pollux

If you are going to create a rule that says week 1 is 3/4/2024 - and week n is datetimeadd("2024-03-04",(n*7),"days") - then yes this is totally doable. If not - then you need to create some kind of rule of how Alteryx should know that week 1 begins on x day.

Onemajor
7 - Meteor

@apathetichell I can make 3/4/2024 as week 1. If I do that, what is "n" in this formula datetimeadd("2024-03-04",(n*7),"days")? or how can I use this? 

apathetichell
18 - Pollux

What's the naming convenion of your input file?

apathetichell
18 - Pollux

something like this should get you most of the way there. you'll need to consider the filenaming logic - what to look for in the filename - if there is the potential for multiple sheets etc.

Labels