Forum Discussion

ASI_12's avatar
ASI_12
New Member
7 months ago

BUG: Matrix + Field Parameters + Groups → Order not respected

I am experiencing an unexpected behavior when using Field Parameters inside a Matrix visual in Power BI Desktop. I created a Field Parameter containing multiple fields organized into groups. When the user selects several fields from the parameter, the order displayed in the Matrix does not follow the user’s selection order. Instead, it appears to follow the internal group ordering defined in the parameter. The issue occurs after a variable number of selections and becomes consistently reproducible when the selected fields belong to different groups.

 

Steps to reproduce:

  1. Create a Field Parameter containing multiple fields, divided into groups as

    • Group 1: A, B, C

    • Group 2: D, E, F

  2. Add the parameter to the Columns of a Matrix visual.

  3. Select fields in a specific order, for example: A, D, C, B.

  4. Observe the actual order displayed in the Matrix.

The Matrix should respect the user’s selection order( A, D, C, B ) but displays the fields in a different order: A, C, B, D. It seems the Matrix is enforcing a group‑based ordering (all fields from Group 1 first, then Group 2), ignoring the user’s selection order.

 

  • This issue is not documented in the Known Issues list.

  • Other users have reported similar behavior with Field Parameters + Matrix.

  • I'm dealing with a very big matrix (more than 150 columns and ~ 40'000 rows)

  • The problem becomes more noticeable when the parameter contains many fields.

 

8 Replies

  • Hi ASI_12 ,

    This looks more like a design constraint rather than a defect in the Matrix visual.

    Field Parameters are backed by an automatically generated table that contains a static ordering column. This ordering is established when the parameter is created and remains unchanged at runtime. 

    Because of that:

    • The sequence in which users select fields in the slicer is not tracked or preserved

    • Column ordering is driven by the parameter’s internal index, not by interaction order

     

    🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.

    💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.

    🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.

    🔗 Curious to explore more? [Discover here].

    Let’s keep building smarter solutions together!

     

  • Hi ASI_12

    The order in which fields appear when using a field parameter is determined by the Field Order column in the field parameter table. Power BI does not track or preserve the sequence in which fields are selected by the user, even if additional columns are added to the field parameter table for grouping or categorization.

     

    You can duplicate the same field row in the parameter table, assign it to a different group and change its Field Order as in the example below for Total Revenue (Parameter orders are 1 and 2) but please note that this will cause the same measure/column to appear multiple times.

     

  • VijayP's avatar
    VijayP
    Community Champion

    ASI_12 

     

    Even if you donot have groups, the same behaviour followed , as there is predefined sort order created when you are creating field parameters . I donot think this is a bug but we might say limitation!

  • Hi ASI_12 

     

    Please try removing groups from the field parameter, give the column order manually in parameter definition

     

    If above one does not works, create a disconnected parameter table with an explicit SortOrder then sort the parameter by this column and try using it instead of grouped field parameters.

  • A Matrix does not preserve slicer click order. For a field placed on Columns, the Matrix always applies a deterministic sort order for that field. With Field Parameters, the “field” is the parameter table, and the Matrix sorts it by the parameter’s internal ordering (effectively the order column / the parameter row order you created which is what your “groups” end up enforcing).

     

    In the Field Parameter table there’s an order column (often named something like Parameter Order). The Matrix will respect that, not click order.

    • If you need a stable order, design it into the parameter table

    • Use Sort by column on the display column

    This won’t match “user selection order”, but it will be consistent and predictable.

     

  • Hi ASI_12 ,
    Thanks for reaching out to Microsoft Fabric Community.
    Just wanted to check if the responses provided were helpful. If further assistance is needed, please reach out.
    Thank you.

  • ASI_12 Hello,

    • Recreate the parameter without groups (single group). Set a stable [Order] and ensure [Name] is “Sort by” that [Order]. You’ll get a predictable order (but still not selection order).
    • If users must dictate the exact order: Use “slots.”


    - Create N field parameters (Param_1 … Param_N) each containing the same fields.
    - Place Param_1, Param_2, … in the Matrix Columns left to right.
    - Add N slicers (one per slot). Users pick A in Param_1, D in Param_2, etc., yielding A, D, C, B.
    - Note: Scales poorly with 150 columns; only feasible for a small N.

    • Offer fixed ordering choices instead of arbitrary order:


    - Create duplicate parameter tables with different [Order] (e.g., business priority, alphabetical, recent usage).
    - Switch which parameter the Matrix uses with a separate “view selector” (bookmarks or a secondary field parameter).

    • If you need free-form, scalable ordering: Use a custom visual (e.g., Deneb/Vega-Lite) that can encode order by selection rank or an input index. Native visuals don’t support per-user, per-session selection-order sorting.


      Thanks

      Haish K 

      If I resolve your issue. Kindly give kudos to this post and accept it as a solution so other can refer this

  • Hi ASI_12 ,

    Just checking in to see if you query is resolved and if any responses were helpful.
    Otherwise, feel free to reach out for further assistance.

    Thank you.