Incorrect Sorting of Dates in Charts and Graphs
This may be a known issue - but when you do a chart of graph in a report by date -- even if you pre-sort the data -- the chart or graph sorts the information incorrectly (see below). Anyone else experience this issue?
-
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!
0I am interested in how to parse out the year and month or the graph calculation - whichever is easier.
0Hi 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
computed:
- "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.
0We 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?
0Please sign in to leave a comment.
Comments
4 comments