Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Week Start and End on specific days/dates

MadeInHB
8 - Asteroid

So I have a large set of data for the year.  It tracks items completed each day.  However, weeks aren't calculated by calendar weeks.  We have a Thursday to Wednesday week.  So, I am trying to create a Week Beginning and Week Ending for every item completed.

 

Example

 

Completed DateWeek BeginningWeek Ending
7/1/20196/27/20197/3/2019
7/9/20197/4/20197/10/2019
7/12/20197/11/20197/18/2019
7/22/20197/18/20197/25/2019

 

Was wondering if anyone has an formulas or easier way to get these dates from the Completed Date.

 

Thanks.

4 REPLIES 4
lmorrell
11 - Bolide

Hi @MadeInHB

 

One possible solution would be to calculate the day of the week, and then add and subtract days accordingly. I have done this in the attached workflow.

 

However, I couldn't help but notice for completed dates 7/1/2019 and 7/9/2019 the week endings are a Wednesday - whereas for completed dates 7/12/2019 and 7/22/2019 the week endings are Thursdays. Is there more information to compute these Week Endings? 

Inactive User
Not applicable

Solution Attached.

MadeInHB
8 - Asteroid

Wow, that looked easier than I was making it.  Thanks!!

JonServiceNow
7 - Meteor

I used the solution above from the Inactive User. To adjust for week beginning on Sunday just delete the adjust start date and it works perfect

Labels
Top Solution Authors