Forum Discussion
Sort Order in Chart
- 7 years ago
Hi Anonymous ,
since you are using this as a legend on your chart you are not abble to change the way it's order in the visual.
You have two work around :
Create a calculated column with the following syntax:
ranking = RANKX ( 'Table1'; CALCULATE ( MAX(Table1[Year] ); ALLEXCEPT (Table1;Table1[Year] ) ); ; DESC; DENSE )Then sort the Colunm Year by this column (this will make all you other visuals change accordingly to this new sorting.
One work around is to create a table with two columns (Year and ID)
Year ID
2019 1
2018 2
2017 3
2016 4
2015 5
Then sort the year column by the ID column, make a relationship between this table and the other table where you have the Year. Finally replace the year on the legend by the year of the last table you created.
Regards,
MFelix
Hi Anonymous ,
since you are using this as a legend on your chart you are not abble to change the way it's order in the visual.
You have two work around :
Create a calculated column with the following syntax:
ranking = RANKX (
'Table1';
CALCULATE (
MAX(Table1[Year] );
ALLEXCEPT (Table1;Table1[Year] )
);
;
DESC;
DENSE
)
Then sort the Colunm Year by this column (this will make all you other visuals change accordingly to this new sorting.
One work around is to create a table with two columns (Year and ID)
Year ID
2019 1
2018 2
2017 3
2016 4
2015 5
Then sort the year column by the ID column, make a relationship between this table and the other table where you have the Year. Finally replace the year on the legend by the year of the last table you created.
Regards,
MFelix