Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Sorting from url issue

GoldenDesign04
8 - Asteroid

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).

 

wmcclure_0-1578336044368.png

 

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 sortBottom of the sort

Where the sort considers the "top" of the descending.

 

Top of the sortTop of the sort

 

Fixes? Suggestions? 

 

2 REPLIES 2
kelsey_kincaid
12 - Quasar

Hi @GoldenDesign04 ,

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.

GoldenDesign04
8 - Asteroid

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.

2020-01-06.png

 

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.

Labels