Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
How to Sort a chart on Dates
kwilliams0
Hello,
I've beat my head on the wall now for about 3 hours on this, for what I am guessing is a 30 second item.
I am creating a support report. So number of cases, and I want it to be a stacked bar chart. The stacked bar is the deployment type. I have the database configured so that the aggregation is done in the query itself. There are three deployment types, which means three records for each month for the past two years. The problem is that I cannot for the life of me sort by date ascending.
Here's a snapshot of the data preview (see attachment 1)
Subsequently, here's where I am trying to modify the sort: (see attachment 2)
So in the bar chart, if I could change the sort on key, I could grab the epoch and sort on that, but that option is grayed out/disabled. I can only sort on what I am displaying, and as a result, it always uses the string of 1, 10, 11, 12, 1, 2, 3, for the months, which is NOT the order I want. Any ideas on how to fix this, make the sort on option editable in this window, or suggest something else (I tried grouping on datetime by month, but instead of a nicely formatted x axis label, I got timestamps!).
Thanks in advance!
Find more posts tagged with
Comments
mwilliams
It's sorting this way, because it's a string. What you could probably do would be to take the month and year and create a date field to use as the x-axis field, with the day always as the 1st, so they all group together. Then, you can just format the x-axis value to appear as just yyyy - MM, like you're trying to have. Hope this helps.
kwilliams0
Wow. So many headaches solved just by creating an extra date column that combines the month and years column. Woo hoo! Thank you!
mwilliams
You're welcome! Let us know whenever you have questions!