Forum Discussion
Custom Visual Highlighting/Selection stops working
- 9 months ago
Hi v-sshirivolu ,
I have issued the ticket - When I will receive any solution, certainly I will share it here 🙂
Hi Q-Click ,
The behavior you’re observing is expected due to how Power BI handles highlights and row identities in Table/Matrix visuals. Highlights (categorical.values[x].highlights) are only sent reliably for small tables or when a single selection exists. For larger tables, multiple columns, or rows containing nulls, Power BI may omit highlights or send placeholder identities (0,1,2…), which cannot be used to detect actual row selection.
To address this issue, add a unique key column (e.g., RowID) as the first categorical column in your table or matrix and rely on it to detect row selection instead of highlights, so selections remain reliable even if identities are placeholders or highlights are missing. For interactive visuals, you can optionally use ISelectionManager to register selections more consistently. Keep your fallback logic for single-row tables to default to row 0. This approach ensures your visual reliably detects selections even with many columns, added categorical fields, null values, or larger datasets, eliminating dependence on inconsistent highlights and placeholder identities and maintaining full commenting functionality.
- v-sshirivolu9 months ago
Community Support
Hi Q-Click ,
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.
- Q-Click9 months agoFrequent Visitor
Hi,
v-sshirivolu Thanks for your response!
I have a follow-up question regarding the “unique RowID column” solution.
Would adding a RowID column truly solve the issue, or is it only a partial workaround?More specifically:
Will this approach still remain reliable if the table/matrix becomes very wide or contains many categorical columns?
The selection/highlighting interruption that I’m seeing appears only when the dataset becomes large enough or when additional columns are introduced.How exactly should a custom visual consume this RowID column?
Since the recommended approach is to avoid relying on highlights[], and the Selection Manager is only suggested as an optional alternative, I’m trying to understand how adding a RowID changes the behavior of how Power BI sends filter/selection context to custom visuals.Does Power BI guarantee that a RowID used as a single unique category will always produce stable identity or filtering context for the custom visual, regardless of dataset size or number of columns?
I ask this because previously the selection context simply stopped being passed once the table became too large, even though no RowID was involved.
I would really appreciate clarification on how adding this RowID is supposed to help technically, and whether it avoids the limitations that cause Power BI to drop highlight arrays or identity information when the underlying table becomes large.
Thanks again!
- v-sshirivolu9 months ago
Community Support
Hi Q-Click ,
The RowID approach isn't a full fix for Power BI's data reduction limits, but it's the most reliable way to keep selection and highlighting working when your dataset becomes large or has many categorical columns. The issue occurs because Power BI drops or compresses identity and highlight data once the model gets too big. When identities are built from multiple columns, they’re the first to be reduced, which is why selection suddenly stops working.
Using a single unique RowID avoids this because Power BI only needs to send one simple categorical value per row, and that identity remains stable even as the dataset grows. In your custom visual, RowID should be used as the main category for selection so you get one consistent identity per row. Power BI handles these single column identities far more reliably than multi column ones. While it doesn’t remove the underlying Power BI limits, it prevents the selection/highlighting drop off you’re encountering.