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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
mroot
Frequent Visitor

ISelectionIds getting reassigned

I am assigning selectionIds to my data points with the following loop:

 

let dataViews = options.dataViews //options: VisualUpdateOptions
let categorical = dataViews[0].categorical;
let dataValues = categorical.values;

for(let dataValue of dataValues) {
    let values = dataValue.values;
    for(let i = 0, len = dataValue.values.length; i < len; i++) {
        let selectionId = host.createSelectionIdBuilder()
            .withCategory(categorical.categories[0], i)
            .withMeasure(dataValue.source.queryName)
            .withSeries(categorical.values, categorical.values[i])
            .createSelectionId();
    }
}

 

In a powerBi report when I select a data point from another visual the update method is called on my custom visual class.  It appears to me that my dataView gets filter to only include that selected data point I clicked from the other visual.  What also seems to happen is that the data points from the other visuals are given new selectionIds.  But I am only given one of the data points to reassign. How do I keep the selection Ids from all my data points (not just the data point that has been selected from another visual) in sync with other visuals when there has been a selection?

 

Thanks!

 

Matt 

 

1 ACCEPTED SOLUTION
1 REPLY 1
Anonymous
Not applicable

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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