cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
FRIDAY Deadline | Submit your Alteryx Use Case by August 17th to qualify for this round of Analytics Excellence Awards presented at Inspire Europe 2018! Learn more.

Filter to return previous Friday until current day.

SOLVED
Meteor

My data is comprised of tickets from the beginning of time. It is updated each day but we only want to return the previous Friday until the current day. For example: Today is Monday February 12th. When my flow is ran it should only return data from Friday February 9th until now. The date column is in a format of Month Day Year: 2/12/2018.

 

Thank you!

@Fred22

 

This will give you the date of the previous Friday for each date in your file, and then filter to those records since the previous Friday.  This workflow keeps the past 8 days if Today is a Friday.  You can adjust that in the filter though if you expect to only keep Today's records if it is a Friday by lowering to 7.

 

From Previous Friday.PNG

 

Meteor

Hi John,

 

Thank you for the input. This looks like it would work perfectly but I am running Alteryx 10.6 and it won't let me open your file. Anyway you could send the file in a different format or the formulas?

 

Thanks again!

Sure - see the workflow and input attached

 

 

Highlighted
Meteor

Hi John,

 

When trying to open alteryx it says there was an error because the document was created by a more recent version of this application and cannot be read.

 

Any suggestions?

See the images of my formula and filter tool configurations attached.

 

From Previous Friday - Formula.PNGFrom Previous Friday - Filter.PNG

Meteor

Great thank you! Let me test this and see if it returns what I am looking for.

Meteor

Hi John,

 

I almost have it working. My only issue I am running into is I need to pull everything since last Friday including Friday. With your formula and filter I am getting everything since Saturday Feb 10th. If it can include Feb 9th too it will be solved.

 

Any suggestions? Thank you very much.

Ok - try this in the formula tool for Previous Friday

 

 

DateTimeAdd([Date],
	Switch(DateTimeFormat([Date],'%a'),0,
		'Sat',-1,
		'Sun',-2,
		'Mon',-3,
		'Tue',-4,
		'Wed',-5,
		'Thu',-6),
	"days")
Meteor

This has worked. Thank you so much for your continued support!

 

So when next Friday roles around Feb 16th - it will only keep data from that Friday correct?