Classic file types are no longer available for use as of January 2021. You can transition your classic files or download a PDF. Learn More

Incorrect Sorting of Dates in Charts and Graphs




  • Mike

    Hi Ken!

    Thanks for sharing. It sounds like you're the first to report seeing this. I'm told that at this time we cannot manually reorder the dates in their current format., but we can create a graph calculation that displays the date in a YYYY-MM-DD format that would in turn drive them to be ordered correctly. We can also parse out the Year and Month, so the dates are bucketed out by Month rather than an individual date, so for example 4/19/2021 could display as 2021 - 4 or 2021 April.

    Let me know if you'd be interested there. In the meantime, I'll get this suggestion connected on the backend. Thanks again and chat soon!

  • Ken Pyzik

    I am interested in how to parse out the year and month or the graph calculation - whichever is easier. 

  • Mike

    Hi Ken!

    I got this info from our engineers. They added the following to the model and then updated the warg to include a new field.

    name: "formattedEndDate"
    type: string
    - "expression"
    - "format_date(\"yyyy-MM-dd\", .endDate)"

    We then tweaked the chart to point at the new field.

    Here's the end result:

    Much of this is Greek to me, but do let me know what questions you have and/or if you are able to make these edits. If not, your CSM may be able to update this for you.

  • Richard McFadden

    We have started using charts more and more as well and have the same issue with dates not being sorted in chronological order (see example below):


    I saw the comments above about being able to change the date format to YYYY-MM-DD to solve this problem.  Is that something we are able to do ourselves on our impacted charts or do we need support/our CSM to help with that?


Please sign in to leave a comment.