Forum Discussion

mhoffmann's avatar
mhoffmann
New Member
6 years ago
Solved

Can't change sort

I am brand new to Power BI and running into what seems like should be an simple issue but I cannot find the answer. I have the chart below with MONTH and YEAR on the axis. I have created a YEARMONTH column I would like to use for the sort to so the dates below appear in order. Problem is, I can't for the life of me figure out how to change the current sort. The sort button is greyed out and I appear to be missing the 'data' icon on the far left that others seem to have.

 

Any ideas how I can regain use of the 'Sort By Column'? Thanks.

 

 

  • Hi mhoffmann ,

    1. If you want to use Sort by Column in the Modeling ribbon, you should first select the column (field) to sort from the Fieldspane, and then select Modeling > Sort by Column to sort your visual. If you don't select a column, the Sort by Column button is inactive.
    2. There is another way to use sort by function that you can try:

    If the data type of the field that you have put in X-axis is not a sigma (∑)  value like Whole number, Decimal number or Fixed decimal number, you can click three dots in the visual and use sort by function directly.

    You can refer the following Microsoft document and similar case for further information that could also help you:

    1. https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
    2. https://community.powerbi.com/t5/Desktop/Sorting-on-Stocked-column-chart/m-p/986457#M470256

     

    Best Regards,

    Yingjie Li

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • Create a Month year and month year sort column in your Date table

     

    Month year = format([Date],"MMM-YYYY")

    Month year Sort = format([Date],"YYYYMM")

    Use Month year Sort one as sort column

  • v-yingjl's avatar
    v-yingjl
    Community Support

    Hi mhoffmann ,

    1. If you want to use Sort by Column in the Modeling ribbon, you should first select the column (field) to sort from the Fieldspane, and then select Modeling > Sort by Column to sort your visual. If you don't select a column, the Sort by Column button is inactive.
    2. There is another way to use sort by function that you can try:

    If the data type of the field that you have put in X-axis is not a sigma (∑)  value like Whole number, Decimal number or Fixed decimal number, you can click three dots in the visual and use sort by function directly.

    You can refer the following Microsoft document and similar case for further information that could also help you:

    1. https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
    2. https://community.powerbi.com/t5/Desktop/Sorting-on-Stocked-column-chart/m-p/986457#M470256

     

    Best Regards,

    Yingjie Li

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

    • mhoffmann's avatar
      mhoffmann
      New Member

      Thank you both for your answers. Using both of them I was able to get everything sorted as needed. Much appreciated!