Forum Discussion

MattN4's avatar
MattN4
Helper I
8 years ago
Solved

Matrix and weeks

Hi,

 

I am trying to do a very simple task, but in power BI it seems impossible.

 

I have a table with 2 columns, week no. and week name, so 1, Week 1. I apply this and my matrix works, and shows week 1 then week 2 etc. but I want to show week 52 first. Easy right, just change week name to be Week 53? Nope, no chance, now it displays week 1, week 10, week 11 etc.

 

How can I get it so PowerBI will show the data correctly?

 

Thanks,

  • Make sure you select the column first - go to the report view, and in fields open the table and click on the column name so it is highlighted

4 Replies

  • SteveCampbell's avatar
    SteveCampbell
    Memorable Member

    Am I correct in understanding you have a column with just the number, and the other wth the name?

    The name is being stored as text, so 10 would become before 2.

     

    To sort by the name, you could:

     

    • click on this column in desktop
    • go to modelling tab and use the "Sort by Colum" dropdown
    • Select week number
    • In the matrix, click the elipse (three dots in the top right), then click the AZ button to reverse the sort order
    • MattN4's avatar
      MattN4
      Helper I

      Hi,

       

      The sort by button is greyed out.

       

      M

       

       

      • SteveCampbell's avatar
        SteveCampbell
        Memorable Member

        Make sure you select the column first - go to the report view, and in fields open the table and click on the column name so it is highlighted