I should not change the order. But i should show the mising years in each category..
...in which case you are into the murky world of data densification!!...here's a video coving the situation Tableau triggers it
caveat: This behavior can change version to version, but have checked the below solution in T10, and all good.
So from the video we are going to use a Table Calc to trigger densification, against a range-aware pill (a range aware pill is either a Date or Bin so Tableau knows the MAX/MIN and increment...this is the range aware bit)
So first I convert your year into a date
[Year (as Date)]
DATE('01/01/' + str([Year]))
and use this instead of your Year field. I then add a Table Calc (I've used index()) on the detail pane, and set the compute using to [Year (as Date)] and Tableau (magically!!) completes the date field. As the video alludes to this behaviour is not well documented by Tableau, and what we know of it is down to the work of (in particular) Joe Make and Jonathan Drummey to enlighten us...eg here a piece looking at changes in T10 When 576 = 567 = 528 = 456: Counting Marks | Drawing with Numbers
Hope that helps.
Densifying Years using TC.twbx 24.4 KB