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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Nishantjain
Continued Contributor
Continued Contributor

Custom Visual - SelectionIdBuilder Method - WithMatrixnode

Hi, 

 

I am working on a custom visual and using the DataViewMappings - Matrix. I am struggling to get the selectionIDs to work. 

 

My dataviewmapping is below. I am not using columns but just rows

 

"dataViewMappings": [
        {
            "matrix": {
                "rows": {
                    "for": {
                        "in": "category"
                    }
                },
                "values": {
                    "select": [
                        {
                            "for": {
                                "in": "measure"
                            }
                        }
                    ]
                }
            }
        }
    ]

 

I have successfully generated the selectionId

 

var selectionId: ISelectionId = host.createSelectionIdBuilder()
                            .withMatrixNode(child, rows.levels)
                            .createSelectionId();

 

The data looks like this

Capture1.PNG

 

 

 

 

 

 

 

 

 

 

Now when I select the first "Carretra" in country "Germany", in my visual, the other visuals don't filter just on the "Carretera" for "Germany" but for all "Carretera"

Capture.PNG

What I would ideally like is for the following selection i.e. just "Carretera" for "Germany"

Capture2.PNG

 

 

 

 

 

 

 

When I check the selectionIDs, I get unique selectionIDs for each datapoint

 

screenshot below showing 6 datapoints, (3 countries by 2 product)

Capture3.PNG

 

 

 

Any help is much appreciated

 

Thanks

Nishant

 

 

0 REPLIES 0

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.