This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now
1 Day Left! - The Alteryx Community will be temporarily unavailable for a few hours due to implementation of the new SSO experience starting tomorrow at 5pm MDT. Please plan accordingly. For more information, read the blog.
Hi, I'm looking for a solution for the search of the most recent files through the input directory. The filenames are all formatted the same way: xyz_ddMMyy, abc_ddMMyy and so on. I want to extract the most recent respect to the month and the second one always respect to the month. For instance today I'd look for January and December files. Files can be more than one for each month
Assuming that you get many different fields from the directory tool (but we only need the field [FielName] for the task) you can use a Regex tool to parse out the date.
Then with a formula tool, you can bring it in a format that alteryx understands as dates, sort them and then only keep the 2 most recent dates with a sample tool. The last step can be swapped with a recordID and filter tool, which will only keep the top 2 records.
Hope that helps, please let me know if that works for you.