Forum Discussion
Get x axis data in order
I have the below data and it is displaying the line charts as latest season (Left) to earliest (Right) but i want it the other way round and can see how to do it. Can anyone help please?
| Season | Variable 1 | Variable 2 |
| Season 15/16 | 80.0% | 74.0% |
| Season 16/17 | 81.5% | 74.3% |
| Season 17/18 | 82.6% | 75.4% |
| Season 18/19 | 83.7% | 74.4% |
| Season 19/20 | 84.0% | 79.6% |
create a desc rank and mark it as sort column
Rank season = rankx(all(Table),Table[season ],,desc,dense)
Mark this as sort column for the season
Refer : https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
3 Replies
- fhillResident Rockstar
Quick Try: Click the ... Icon ont he Graph and Change the Sort Ascending / Descenging order.
Long Option: You can add a 'Sort Order' data column, and while 'Variable 1' is highlighted on the Fields Secion, under 'Modeling' choose 'Sort by Column' and pick Sort Order.
- Greg_DecklerCommunity Champion
Not sure I 100% follow. Use the ellipses in the visual to switch sorting order descending or ascending as well as the column being sorted on. Can use a Sort By column if all else fails.
- amitchandakSuper User
create a desc rank and mark it as sort column
Rank season = rankx(all(Table),Table[season ],,desc,dense)
Mark this as sort column for the season
Refer : https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column