I have a data set connected to our semantic layer that is a direct query. When i create graph visuals (bar chart, line chart, etc) with date in x-axis. I cannot get the x-axis to sort in chronological order.
The fields are formatted as a date correctly. When I change the visual to a table or a pivot, it does sort the date column correctly.
The query sent to the semantic layer establishes sort order by date.
Does anyone have any experience with this and how to resolve
Hello @egutierrez, welcome to the QuickSight Community!
When you place the date field into your table or pivot table, are you utilizing the feature in the field well to set the sort by date? If it isn’t the first column on that visual, it likely will not do it automatically but may be basing the sort from a different field. Here is some documentation about sorting visuals from AWS to show that process more clearly.
Welcome to the QuickSight community. As Dylan recomended, if date field is present on x-axis enable data sort and change sort order as shown in screenshot below.
Hello @egutierrez, also, if you could click that down arrow on ReportDate and hover over the sort feature, a screenshot of that could also be helpful. It will show the exact field type that QuickSight has determined for the field. It will look something like this:
Hello @egutierrez, maybe it is because you are Aggregating by Day when it looks like your dates are in a Week format. Does it fix your sorting if you make that change?
Hello @egutierrez, I think I figured it out. I believe the issue is your date format. Try using parseDate({date}, ’ MM/dd/yyyy’) and use that in your field well instead. I will mark this as the solution for now, but if this still doesn’t work as you are expecting after this change, I would recommend filing a case with AWS Support where we can dive into the details to help you further. Here are the steps to open a support case.