Forum Discussion

Robert14358's avatar
Robert14358
Icon for Resolver III rankResolver III
2 years ago
Solved

How to sort columns in a matrix by measure value?

If you have 17 columns in matrix with 1 measure, how do you sort left to right based on measure value?

  • Ritaf1983's avatar
    Ritaf1983
    2 years ago

    Hi Robert14358 
    The matrix doesn't have x/y axes, if we are talking about sorting columns as I mentioned in my previous response it is possible only with the matrix from the market place.
    You can right-click on the "Grand total" Cell:

     

    Choose the option to sort "your columns" by this row:

    Result :

    The pbix is already attached to the previous response.

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

     

8 Replies

  • Hi Robert14358 

    If the sorting must be dynamic I am afraid that we don't have this functionality with the core matrix visual.
    There is an idea about the issue you can vote for it here :
    https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=905c11cc-3315-ec11-b76a-281878bd1a87

    There is a free matrix from the marketplace that can sort the columns too :

    I attached the pbix for my response to follow

    + inforiver visuals have this functionality too , but for pay 

     

    P.S

    If for a moment we disconnect from the technical aspect, it’s also important to note that ranking from large to small shouldn’t be horizontal, but vertical. In other words, the metrics should be in 'rows.'


    The horizontal axis is a logical axis (like in distribution graphs), and its logic is consistent — a timeline moves from old to new, a range axis moves from small to large.

    When we change these concepts, we make it harder to read the visualization. Therefore, regardless of the tool's technical limitations, I strongly recommend that the 17 categories you're comparing be arranged vertically, and whatever you are comparing them against (if it's some logical axis) should be arranged horizontally.

    And if it's just hierarchical groups (lists within lists), it’s better to create a hierarchical matrix without column divisions:

     

     

     

     

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

     

    • Robert14358's avatar
      Robert14358
      Icon for Resolver III rankResolver III

      how do u sort the X axis values from greatest to least? based on grand total

      • Ritaf1983's avatar
        Ritaf1983
        Icon for Super User rankSuper User

        Hi Robert14358 
        The matrix doesn't have x/y axes, if we are talking about sorting columns as I mentioned in my previous response it is possible only with the matrix from the market place.
        You can right-click on the "Grand total" Cell:

         

        Choose the option to sort "your columns" by this row:

        Result :

        The pbix is already attached to the previous response.

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

         

  • there is currently a suggested idea that is open for this for over 4 years, can all of you who saw this request please go and vote for it?

    Microsoft Idea

     

    this is a basic excel function and needs to be in power bi.

  • Is it a single row?  how should it be sorted if you have multiple rows?

  • no i need this in a maxtrix, pretend its a sum of sales where the row is product and the column is country, i need to sort the columns based on sales by country