cancel
Showing results for 
Search instead for 
Did you mean: 

Date Formulas

SOLVED
Fescobar
Asteroid

Date Formulas

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

Attachment
Download this attachment
5 REPLIES 5
Fescobar
Asteroid

Date Formulas

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

Attachment
Download this attachment
DataNath
17 - Castor

Re: Date Formulas

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
Asteroid

Re: Date Formulas

Thank you .@DataNath

 

Just the last three Mondays rather than the last five.

 

Thanks again!

 

Fausto

Re: Date Formulas

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.

Attachment
Download this attachment
Fescobar
Asteroid

Re: Date Formulas

.@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?

 

Re: Date Formulas

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!