Alteryx Designer Desktop Discussions

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

Date Formulas

Fescobar
8 - Asteroid

Hello Alteryx Community,

 

I hope that everyone is doing well and that all of you Mother's had an amazing Mother's Day.

 

I have the attached file goes back to every Monday for the last five weeks.  The SQL query has to stay the same because I am using the same workflow to produce several outputs on the same run. 

 

Thank you!

 

Fausto

5 REPLIES 5
DataNath
17 - Castor

Hey @Fescobar can you flesh this out a bit please? From the data you've provided, what are you hoping to see in the output?

 

Thanks

Fescobar
8 - Asteroid

Thank you .@DataNath

 

Just the last three Mondays rather than the last five.

 

Thanks again!

 

Fausto

DataNath
17 - Castor

Does this work how you want? Basically just found the max Monday date and filtered out anything that's not within -3 weeks of that.

Fescobar
8 - Asteroid

.@DataNath

 

Thank you so much, this is perfect.  I assume that if I ever need to switch the date I can just change the value in the formula?

 

DataNath
17 - Castor

Yes exactly. If you want a specific date then you would use that i.e. [Monday] >= <Enter date here in correct format (yyyy-mm-dd)>

 

However, if you want to stick to the most recent 'x' amount of weeks being shown then just adjust the '-21' I have in the DateTimeAdd([Max_Monday],-21,'day') formula. For example 4 weeks would be -28, 5 would be -35 and so on!

Labels