Forum Discussion

Jared_Leonard's avatar
Jared_Leonard
Frequent Visitor
4 years ago
Solved

Power BI Matrix Sort Rows By Value

Hi All,   I have a set of data I am using from surveys that is like so: Every question answered is a row in the table with the followiung attributes, a responseid attribute that is unique for each ...
  • DemoFour's avatar
    DemoFour
    4 years ago

    Hi Jared_Leonard 

     

    Glad to hear that you making progress. I have enclosed a picture of a test data and how to add an index column column in the query editor, this can then be sorted in Desktop. 

    You can add the same to your dimesions Questions and then when you are in the desk top view sort the column by that row. 

    The code you need is 

     

     

     

    = Table.AddIndexColumn(#"YOUR PREVIOUS STEP", "COLUMN NAME", 1, 1, Int64.Type)

     

     

     

     

    The column in the UI will add your index

     

    Then when in desk top choose the table column and then the sort by option and choose the index, this will then sort your matrix in the right ordser for you. 

     

    Chose the column you want to sort and then sort by 

    If you need to provide dummy data, then this can be pasted in here or you can email it across if that is easier for you. 

     

    Hope this helps. 

    kind regards