Forum Discussion

isjulia's avatar
isjulia
New Member
2 years ago
Solved

Field Parameter in Matrix not sorting by column

Hey!

 

I am working with a field parameter to select columns in a matrix. I have the field parmeter and the matrix set up and it is working properly. 

 

However, when I select the options in the slicer, they are not showing in the correct order in the matrix. How can I fix this? Is this some sort of bug?

 

Field parameter: 

 

When no slicer selections are made, the columns are in the correct order per the field parameter sorting.

 

Matrix:

 

Slicer:

 

 

When I make a selection in the slicer, they are showing out of order. They are actually showing in the order they were selected. It should be showing Outdoor Rows, Outdoor Circuits, Outdoor Length, Outdoor Equip. Weight.

 

Matrix:

 

Slicer:

 

 

How can I make this order fixed in the matrix, even though the selected order in the field parameter is different?

 

Please, help me! Thank you

  • Hi isjulia 
    The fields parameter is a kind of "measures list", so there is no option to sort them not in the order they selected.
    (because sorting options are available only for rows/columns, not measures)
    If the sort issue is critical you can use a matrix with dynamic measure / calculated groups instead.
    The pbix with an example of a dynamic measure is attached.

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

    members find it more quickly



  • I think in this case the dynamic matrix / calculated groups are the only possible alternatives including creating measures.
    And yep it doesn't work because even if every parameter is from a column ...in the visual table is like a "value"...

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

    members find it more quickly

4 Replies

  • Hi isjulia 
    The fields parameter is a kind of "measures list", so there is no option to sort them not in the order they selected.
    (because sorting options are available only for rows/columns, not measures)
    If the sort issue is critical you can use a matrix with dynamic measure / calculated groups instead.
    The pbix with an example of a dynamic measure is attached.

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

    members find it more quickly



    • isjulia's avatar
      isjulia
      New Member

      Hi Ritaf1983!

       

      In my case, in parameters I bring columns from a table, not measures. If these columns aren't in the correct order, the analyzed value is compromised as it becomes messy. Would there be any way to fix the order of the columns regardless of the order in which these parameters are selected?

       

      My data model is very complex, and in this matrix I bring columns using parameters from 4 more tables, so the user can be free to see what he wants.

       

      I tried to do a sort by column on the parameter table, but it doesn't work.

       

      Thank you very much for your help

      • Ritaf1983's avatar
        Ritaf1983
        Super User

        I think in this case the dynamic matrix / calculated groups are the only possible alternatives including creating measures.
        And yep it doesn't work because even if every parameter is from a column ...in the visual table is like a "value"...

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

        members find it more quickly

  • Interestingly the desired behaviour works in Power BI Desktop when you're developing the report, but when published (and users are using it online) it changes to adding columns onto the end as and when they're selected by the user...

     

    So it doesn't seem like an issue with PowerBI itself unable to do it, just the behaviour of the online version.