In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

date calculation

Ekta
8 - Asteroid

Hi Folks, 

Please help me to solve this--

 I have a column of dates:

Date 1               today's date        Output 

2018-10-10       2019-05-03          previous week
2019-04-29       2019-05-03          this week
2019-04-28       2019-05-03           last week

2019-04-22       2019-05-03           last week
2019-05-05       2019-05-03           this week

2019-05-06       2019-05-03            next week

2019-05-12       2019-05-03             next week
2019-05-09        2019-05-03            next week

 

I have only Date 1 as my input and i need to categorize it into 4 categories  which is previous week , this week, last week , next week.

this week starts from ... monday to sunday ie- from 29-05-2019 to 05-05-2019

next week starts from 6/may/2019 to 12/may /2019

last week starts from 22/april/2019 to 28/april/2019

rest all can be categorized as previous week.

 

Please help me with it.

 

Thank you so much in advance

 

 

 

 

 

 

 

 

 

 

4 REPLIES 4
yalmar_m
11 - Bolide

Dear @Ekta,

 

Please find my proposed solution attachted.

Does this work for you?

 

Best,
Yalmar

Ekta
8 - Asteroid

Thanks a lot Yalmar ,  i also need one more category which is last week .. I am unable to write any formula for it.. please help me with it .. last week is one week prior to this week 

yalmar_m
11 - Bolide

@Ekta 

 

Changed it!

Ekta
8 - Asteroid

Thanks a lot :)

Labels
Top Solution Authors