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.
I have a workflow that has worked wonderful for the time I've been using it. Except now. It scrapes a listing of url links from a directory, sorts by descending and then I use select to grab the first entry. Which should be the most recent one.
Though now it is putting January on the bottom of the list instead and keeping December 31 as its most recent. Starting from December (down) all the dates align perfectly until I get to the end of the data (90 days worth).
These are the examples of the childurl pull after sort by descending:
Bottom of the sort, containing the recent files I want to pull into Alteryx
Bottom of the sort
Where the sort considers the "top" of the descending.
My guess is that since you're sorting on strings, the sort tool cannot recognize that January 2020 is after December 2019. It will only sort the numbers as they are presented without factoring in any date specific logic. What you could do is parse out the date from your string, then sort on that. You could either use text to columns and delimit on the underscore, or use RegEx to parse that out.
Thanks for the clarification. Love the learning as I go. It refines my workflows and I get better at it everyday.
I worked this out while waiting for a, wonderfully prompt, response from this community.
I use this to create the new column, parse it as a date/time, sort by descending, and then select only the child url. Back to the rest of my workflow with the data ordered properly and selecting the correct record.