Forum Discussion
How to know which visual triggers Update function of Custom Visual
Hi XiaodongLiang,
Visuals are isolated from each other and as such, you can't know what other visuals are doing; just what data your visual has been provided by the main Power BI window into their dataView (which you configure in your capabilities).
If you want your visual to cross-filter others then you will indeed need to create selection IDs for any clickable elements and ensure that the correct IDs are passed out when you call selectionManager.select() on events. This is the documentation you'll need to understand this concept further (if you haven't seen it already), and this contains examples for categorical, matrix and table dataViewMappings.
For your visual to respond to cross-highlight events from other visuals, you will need to enable your the visual for highlighting. Then you will get further info about which data points you are highlighted and you should write code to manage this in your visual - the linked article goes through this with examples too.
If you don't want particular visuals to filter your visual, then edit their interactions in your report to that they don't affect each other.
Good luck,
Daniel
Hi dm-p
I tried the way of this link in my implementation of custom visual, with table dataViewMappings.
https://learn.microsoft.com/en-us/power-bi/developer/visuals/selection-api
My doubt is from where the classes "Selector" and "SelectorsByColumn" in ISelectionId, come from.
My coding not compliled without the required import of those 2.
Please explain what need to be imported.
Thanks,
Lasantha