Alteryx Designer Desktop Discussions

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

Grouping Dates in a New Column

jmathew94
7 - Meteor

I am using a formula tool to create a "Week Of" column. I need to use the minimum date found within the set of data as my beginning value. This date will always be a Monday and it needs to run through Sunday. For example, in my reference column, let's call it "block date" my minimum date would be 10/23 and my new column would need to show "10/23-10/29". I have tried every variation of date time format, date time add with 6 days and nothing seems to work. Am i approaching this situation incorrectly? Is there an easier way of creating this grouping category in a new column? Please help!!

4 REPLIES 4
cjaneczko
13 - Pulsar

Can you show a sample of your data set with a few weeks of data and what you are trying to accomplish?

DataNath
17 - Castor

@jmathew94 are you looking for something like this? In order to do the date calc we need to add the current year and then parse it into ISO format (the only one Alteryx can work with). From there, we can add 6 days to this [Block Date], format it as we need i.e. turn 2023-10-29 (ISO format) into 10/29 (%m/%d). After that, we just need to place it next to the original [Block Date], separated by a hyphen.

 

Week Of field.png

jmathew94
7 - Meteor

Date Grouping.JPG

The second column is what i am trying to accomplish. This data appends week over week therefore I will only need the minimum value of that week as my beginning value and the number after the hyphen would be 6 days after that minimum date 

DataNath
17 - Castor

@jmathew94 feels like there must be a more succinct way but I've adapted my original response after  you already had the year in there and weren't always just using Monday dates:

 

Week Of field.png

Labels