Forum Discussion

AshleyGwozdz's avatar
AshleyGwozdz
Qrew Member
3 years ago

Sorting by date with empty dates

The current sort for my report is by date, newest to oldest, and grouped by day.

The default seems to be that if the date field is empty, this record shows at the very bottom of the report. 

Is there a way to get the records with empty dates to show at the top of the report instead?



------------------------------
Ashley Gwozdz
------------------------------

4 Replies

  • no problem,
    The field that you display on the report does not need to be the same field that you sort on. So just create a new formula date field called [Date Sort] with a formula of

    IF(IsNull([My Date Field]), Date(2099,01,01), [My Date Field])

    That will sort blanks as the most most current. 


    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------
    • AshleyGwozdz's avatar
      AshleyGwozdz
      Qrew Member
      Thanks so much Mark! 

      I am getting an error on this code. Is there something missing? 

      "Expecting text but found date"



      ------------------------------
      Ashley Gwozdz
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        This would be a date so change the field type to be formula date.

        ------------------------------
        Mark Shnier (YQC)
        mark.shnier@gmail.com
        ------------------------------