Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Year Sort on Clustered Column Chart

Does anyone know how to switch the order of the years on the chart below? This is a clustered column chart. Years is my Legend

 

 

  • Hi, Anonymous 

     

    I'm pretty sure that the idea of creating a sorting column is completely correct, but there is a problem here.

    Your sorting column is calculated based on the year column, and then the year column is sorted based on the sorting column.

    This will cause a circular dependency, which cannot be supported.

    You can try to create an index table in Power Query to create a sorting column by merging.

    As Kim did, if that doesn’t work, you can try to create a sort hard-code in the data source, which is easy to make in Excel, and then import the data to Power BI

     

     

    Is this the result you want? Hope this is useful to you

    Please feel free to let me know If you have further questions

     

    Best Regards,
    Community Support Team _ Zeon Zheng
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

6 Replies

  • Go to Data view and select the year column and right click and sort as descending. 

  • Hi, Anonymous 

    I am not sure how your data model looks like, but one of many ways is,

    create a ranking measure for 1980 1990 2000 2010 2020 and put the measure into the tooltip section of the visualization. Then, you can click three dots (upper right side of the visualization) and select the option that is "sort by ranking measure. By doing this, you can select ascending order or descending order of the ranking measure.

    Or, please share your sample pbix file's link here, then I can try to look into it to come up with a more accurate measure.

    Thank you.

     

    Hi, My name is Jihwan Kim.

     

    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

     

    Linkedin: linkedin.com/in/jihwankim1975/

    Twitter: twitter.com/Jihwan_JHKIM

  • Hi, Anonymous 

     

    I'm pretty sure that the idea of creating a sorting column is completely correct, but there is a problem here.

    Your sorting column is calculated based on the year column, and then the year column is sorted based on the sorting column.

    This will cause a circular dependency, which cannot be supported.

    You can try to create an index table in Power Query to create a sorting column by merging.

    As Kim did, if that doesn’t work, you can try to create a sort hard-code in the data source, which is easy to make in Excel, and then import the data to Power BI

     

     

    Is this the result you want? Hope this is useful to you

    Please feel free to let me know If you have further questions

     

    Best Regards,
    Community Support Team _ Zeon Zheng
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.