Hello,
I was wondering if there was a way to filter a data set in Alteryx to only display the last weekday of a certain month.
For example, if I have data whose items have corresponding dates of all of August (and nothing but August) and I want it to filter out everything but 8/30/2019 (since 8/31/2019 is a Saturday), would that be possible?
Thanks!
Solved! Go to Solution.
Hi @wht822 ,
https://help.alteryx.com/10.1/Reference/DateTimeFunctions.htm
datetime format with %a or %A will give Fri or Friday for all dates .
Summarize and filter for maximum Friday date.
Join data to extract records with max Friday date .
I think that this should do the trick. The branch of the workflow at the bottom determines the last day of the month of data and then uses another formula to determine if that day is a Saturday or Sunday to go back to the closest weekday. Let me know if this helps. Workflow attached!
Very helpful. Thanks!
Had to tweak this one to fit my specifications but I ended up using this. Thanks! This helped a lot considering I'm relatively new to Alteryx. Any chance you know of a way to run this workflow multiple times, so every spreadsheet in a certain file runs through the workflow with a separate output for each one?
Glad you got it figured out! To run the workflow once for every file you will want to turn it into a batch macro with a control parameter and an action tool (interface category) attached to the file input in order to update the file path and then you will need a creative way of setting the file path to write out to, likely using the "Take File/Table Name from Field" option in the output data tool.
A great starting point would be watching this free training video on building your first batch macro: https://community.alteryx.com/t5/Videos/Build-Your-First-Batch-Macro/td-p/52900
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
5 |