Forum Discussion
Sort chronologically x axis based on date and time column
- 5 years ago
Hello Anonymous ,
Thank you for your answer.
Comparing with your data, I thought everything was equal, but then I noticed that the problem was related to the legend. In fact, when I excluded it, dates are sorted chronologically.
I think the problem is related to the model structure. The chosen column for the legend is from another table. This table is not connected directly to the table that I'm using for the values on the y and x axis and the relationship between both tables are many to many. Now I'm trying to recreate the model to be possible to include the legend and keep x axis sorted chronologically.
Best regards,
Hi valcat27 ,
Sorry for that I assuming you are using an Excel file as data source. Could you please share a screenshot of your date column in SQL server with me to show me more the date column details? What's the data type of your date column in SQL Server?
Best Regards,
Yuna
Hello Anonymous,
In SQL server the type of my date column is datetime.
(I ran this code to get the output above:
select COLUMN_NAME, DATA_TYPE
from INFORMATION_SCHEMA.COLUMNS
where TABLE_NAME = 'Table1')
This is an example of some values in that column in SQL:
Is this the information you were asking for?
Thanks