Forum Discussion
Line chart not sorting by quarter
My data does not have dates (So I can't connect dates with calendar table to get quarter). But My data has quarter, Year and total sales columns. I have created a line chart and now trying to sort it using quarter and year but not getting te correct order of quarter and year. I have created quarter-Year combined column to sort the data. Any suggestions how I can sort is in correct order?
| Year | Quarter | Total Sales | Qtr-Yr |
| 2021 | 1 | 500 | 2021-1 |
| 2021 | 2 | 600 | 2021-2 |
| 2021 | 3 | 800 | 2021-3 |
| 2021 | 4 | 900 | 2021-4 |
| 2022 | 1 | 400 | 2022-1 |
| 2022 | 2 | 600 | 2022-2 |
| 2022 | 3 | 1200 | 2022-3 |
i got my answer. On the visual, top right hand side if you click on 3 dots, it gives you an option to sort by axis and choose Year-Quarter which is the column selected for x -axis and it now sorts correctly.
5 Replies
- claymcooperResolver II
Can you share a screenshot of the line chart so I can get a better understanding of the problem?
Thanks!
- RickJaniFrequent Visitor
i got my answer. On the visual, top right hand side if you click on 3 dots, it gives you an option to sort by axis and choose Year-Quarter which is the column selected for x -axis and it now sorts correctly.
- RickJaniFrequent Visitor
It is showing 2021 Q3 not in order
- RickJaniFrequent Visitor
I merged year and quarter column and sorting by that but still not getting the correct order.