Forum Discussion

jameshoneywill's avatar
jameshoneywill
Frequent Visitor
3 years ago

Visual date sorting (Blank) to other end

Hi 

I'm trying to move the (Blank) section to the other end, i.e. after the last date, but I want to retain the order of the dates...

I'm using a date table so I don't think I can rank fields in that unless I can add a blank row to stay at the end of my date table somehow?

Hopefully, someone has an easy fix?

Thanks
 

2 Replies

  • jameshoneywill , if these is blank in you table, it should be give a highest number on sorting (in sort column )

     

    example

    if(isblank([Month Year]), 9999999, year([Date])*100 + month([Date]) )

     

    Use this as sort column

     

    If there is no blank, means either date table is missing dates (seems like the case here)

    or fact is missing dates on the join column

    • jameshoneywill's avatar
      jameshoneywill
      Frequent Visitor

      Hi amitchandak 

      Yes, the fact table is missing dates (the field is an expected delivery date which is unknown so will be blank where this is the case - I don't want to replace bank with a phantom date, I do want it to show as blank)

      Currently, in the date table I am sorting based on "MonthOffset" (e.g. October 2022 = -1) so that the months order correctly.

      Are you saying I should create a custom column in the date table? so the negative result is "MonthOffset" and the positive as, for example +99999)

      Will this work even if the date table doesnt have a blank?