Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
stian_r
Frequent Visitor

Custom Matrix Visual - Expand/collapse row headers problems

Hello, I've been having some trouble figuring out how to do expand and collapse on row headers of my custom matrix visual.
I've followed the guide on your docs here but buttons don't all work.

 

I'm rendering a button for nodes where node?.isCollapsed != undefined, meaning it should be expandable/collapsable. However, I cannot get this to work for deeper levels than the first. Comparing the default matrix visualization, the buttons are rendered correctly. Therefore I suspect it has something to do with the creation of SelectionId of the inner rows. This is where I just can't figure anything out because the documentation on SelectionId for matrices is lacking.

 

stian_r_0-1738703563829.png

In image, button for "Resultat" works, "Driftsresultat" within does not. 

 

Can I get some help identifying the issue? Debugging selectionId is not fun, wish its api was open.

4 REPLIES 4
stian_r
Frequent Visitor

Thanks for timely response,

Having re-read the docs and gone over and made sure I had everything configured correctly, I've gotten no closer.

Here are the selectionIds of rows "Resultat" and "Driftsresultat" respectively from initial post.

{
    "deepestNodeLevelInPath": 0,
    "measures": [],
    "dataMap": {
        "Plan.Lv1": [
            {
                "identityIndex": 14
            }
        ]
    },
    "nodeIsCollapsed": false,
    "nodeIndexes": [
        1
    ],
    "key": "{\"Plan.Lv1\":[{\"identityIndex\":14}]}[]"
},
{
    "deepestNodeLevelInPath": 1,
    "measures": [],
    "dataMap": {
        "Plan.Lv2": [
            {
                "identityIndex": 9
            }
        ]
    },
    "nodeIsCollapsed": false,
    "nodeIndexes": [
        1
    ],
    "key": "{\"Plan.Lv2\":[{\"identityIndex\":9}]}[]"
}

Maybe there's something I missed.

I've found I can drill down using the context menu but not my buttons. They both receive the same selectionId for the row so I don't understand why they don't behave the same...

@suparnababu8 do you have any suggestions or know of someone I can ask for suggestions, or should I start a new thread?

suparnababu8
Super User
Super User

Hi @stian_r 

 

-  Verify that your data hierarchy is correctly defined and that each level of the hierarchy is properly configured. The expand/collapse functionality relies on a well-defined hierarchy.

- Ensure that the SelectionId for each node is being created correctly. The SelectionId should uniquely identify each row in your matrix, including the deeper levels.

 

If you need more info please go through this accepted solution by CST - Solved: expand collapse for column matrix - Microsoft Fabric Community

 

Thanks!


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors