Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Order columns in matrix

Helloo!

 

I've want to include 4 columns in a matrix but unsure how to order the columns so they are in date order? My column headers are like this:

 

Q1 2020Q2 2020Q3 2019Q4 2019
    

 

Right now it's alphabetical but need them to be Q3 2019, Q4 2019, Q1 2020, Q2 2020.

 

Does anyone know if this is possible whilst still only displaying the header text as it is right now?

9 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      amitchandak Thanks for your reply - I don't have sort by columns as an option anywhere on Power BI? 

      • lkalawski's avatar
        lkalawski
        Icon for Resident Rockstar rankResident Rockstar

        Anonymous 

        Are you using Live Connection or Import?

        To see the Sort by Column option, you need to select the column on the right, and then an additional Column Tools tab will appear.



        _______________
        If I helped, please accept the solution and give kudos! 😀

  • lkalawski's avatar
    lkalawski
    Icon for Resident Rockstar rankResident Rockstar

    Hi Anonymous

    You need to add an additional column in the table you are retrieving data from. This column should contain numbers from 1 to n - to sort the values. Then in the Model view, click on the column with dates and select "Sort by Column" - (Column Tools tab and Sort section) and select the column with numbers.


    If you do this, remember to select the sort column on the matrix with dates - if you do, you can additionally set whether it should be ascending or descending.
    In case of problems, I can send screenshots with the steps.


    _______________
    If I helped, please accept the solution and give kudos! 😀