Alteryx Designer Desktop Discussions

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

Compare Day of Week by number over years ( 1st Monday 2019 vs 1st Monday 2020)

Gana_Baliada
7 - Meteor

Hi, I've been trying to solve this problem but there always seems to be errors. What I'm trying to do is build a workflow that compares data by day of the week, over years. which is basically - 

1st Monday 2019 vs 1st Monday 2020     or

10th Friday 2019 vs 10th Friday 2020. 

 

I would also need to get this data into a row (1st Monday 2019 vs 1st Monday 2020) and calculate the difference. Attached is an excel file with sample data and sample output. 

 

 

5 REPLIES 5
fmvizcaino
17 - Castor
17 - Castor

Hi @Gana_Baliada ,

 

Here is a solution.

Let me know if this works for you.

fmvizcaino_0-1593567532833.png

 

 

 

Best,

FErnando Vizcaino

AbhilashR
15 - Aurora
15 - Aurora

Hi @Gana_Baliada, attached is one of the many approaches you could take to set up data for downstream calculation.

 

I chose to phase shift each date by -1 year and joined the data to itself (i.e. 2020 dates now become 2019 and when joined to itself will show up in the format you want it to be in). 

AbhilashR_0-1593568085991.png

It might be a poor explanation of the approach but take a look at the solution and let me know if it doesn't make sense.

Gana_Baliada
7 - Meteor

This is amazing, very clean design, thanks a ton!!

Gana_Baliada
7 - Meteor

HI @AbhilashR ,

 

Thank you for your response, however, comparing 1/1/2019 vs 1/1/2020 wouldn't serve the purpose here since 1/1/2019 was a Tuesday where as 1/1/2020 was a Wednesday. What I want to compare is the performance of day of week over years so @fmvizcaino 's answer is what I was looking for.

 

Thanks again,

Gana

RobertOdera
13 - Pulsar

Hi, @Gana_Baliada 

 

Try this.

Please mark as an acceptable solution + like, if it works for you.

 

RobertOdera_0-1593572426933.png

 

The workflow is attached.

Cheers.

Labels