Visokio website     Downloads     Video tutorials     KnowledgeBase  
Ranking: Wanting to Rank Dates Distinctly - Visokio Forums
Ranking: Wanting to Rank Dates Distinctly
  •     aeastwood January 23, 2015 12:35PM
    I have a date field in one of my files, with about 50 distinct dates in it. I want a field ranking these dates from 1 to 50 (from earliest to latest) - I tried using 'RANK([Date], [Date], TRUE, FALSE, SUBSET())' in a new field, but that gives me 1, 145, 287 (because there are 144 records with the first date and 142 with the second date). How can I get it to rank them 'distinctly' for lack of a better way of putting it, like I described above?
  • 3 Comments
  •     paola January 23, 2015 12:39PM
    In the DataManager single out the [Date] field, then use DeDuplicate block to end up with a list of unique values. Rank them in the Field organiser (create [Rank date] field), then merge the result with your main dataset.
  •     tjbate January 23, 2015 12:50PM
    Alex - The result you see illustrates the difference between a RANK function and a DENSERANK function. See this Idea to add a DENSERANK function:

    http://forums.visokio.com/discussion/1079
  •     aeastwood January 26, 2015 4:50AM
    Thanks both, the solution worked perfectly.

Welcome!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership