Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello friends!
I have a problem with the selection manager in my "Parallel Coordinates" custom visual. I am using table dataview mapping with up to 10 dimensions (columns), the amount of rows is up to 10 000. Each row is displayed in the form of a D3 path, essentially representing the features of this demo visual: http://intervis.projekte.fh-hagenberg.at/USIVIS/PC3/examples/PC3.html?q=none
For each column I have a certain criteria on what should be selected, for example every row in the table with a value between 50 and 80 in column1 and value between -1 and 3 in column2 should be selected. Getting the rows that should be selected is not a problem in my algorithm, however the selection manager takes an unreasonable amount of time to select the items.
Essentially my code works like this, in a very simplified way:
this.selectionManager.clear();
let currentSelection: Array<ISelectionId> = new Array<ISelectionId>();
dataRows.forEach(row=> {
if(row.meetsSelectionRequirements){
currentSelection.push(row.selectionId);
}
});
// the array currentSelection contains up to 10 000 selectionIds
this.selectionManager.select(currentSelection);
When selecting the currentSelection via the selectionManager, a severe slowdown and performance issues occur. Assuming that the amount of selectionIds is simply too big for the selectionManager to handle in a reasonable amount of time, I was wondering if there is any solutions or workarounds for this problem.
One approach I thought about was whether or not it is possible to merge multiple selectionIds into one cumulated selectionId, so that the selectionManager only has to handle one selectionId that contains all the information. However I have not yet found a way to implement this.
The second option I thought about is whether or not it is possible to manually create categories for the selection, in my case there would be two categories: MeetingRequirements and NotMeetingRequirements. I understand that it is possible to generate selectionIds with Categories, for example a field titled "Continents" would have the categories "Africa, Europe, Asia, ...". But is it possible to create these categories dynamically within the code depending on the data and then get the according selectionIds?
I would be very grateful for any hints or tricks on how to solve this issue, so please let me know if there are any options I could try or if this amount of selectionIds is simply "too much" for PowerBI.
Thank you and best regards from Austria,
George
Have you done troubleshooting with logarithmic ramping up of cardinality? Ie start with 50 dimension members, then 500, 5000, 50000 etc to see where it breaks?
Are you sure you're not producing a cartesian product across all your dimensions?
Thank you for your reply! Unfortunately I am not sure how to apply your suggestions, as my experience with more complex matters of PowerBI custom visuals is quite limited. The thing is that the application does not break, it is just that the more rows I select via the selection manager, the longer it takes to select them (which makes sense, obviously). I use the workaround discussed in this post to create the selectionIds: https://community.powerbi.com/t5/Developer/How-to-Build-SelectionID-for-table-visual-Source-Code/m-p...
Therefore, every row in my dataset has its own selectionId. Selecting up to 300 rows works without a problem, between 300 and 1000 rows quite a slowdown gets noticable. When selecting more than 1000 rows (=1000 selectionIds or "e"-Elements) it usually takes more than 15 seconds for the selection operation to complete, which can obviously not be seen as usable anymore.
Now I am wondering whether or not there is an option to make the selectionManager more performant, for example by adjusting the way that the selectionIds are built. Essentially what I want to achieve is, that the data rows that I select in my custom visual also get highlighted in other visuals in my dashboard.
Hi @USIVIS_Georg,
Having < 1000 selectionIds active in a visual creates a lot of interactions and context between other visuals in the same page and this will not only give the visual a lot to do, but also the Power BI application in keeping everything in sync between visuals. Having this many points available for selection, but also potentially having so many selected is quite a niche use case - I don't think that many of us might have gone this far into things, so you're probably ahead of a lot of us 😛
It's hard to make a suggestion without being able to see your visual or your intended use cases, but I would first question if making every data point selectable is the correct approach, or if this can be mitigated by making, say, each series or line selectable instead, which would dramatically reduce the number of selections active in the visual.
I would also then check to see if the table dataViewMapping is the correct approach here, as it's not very powerful, although selections do need to be at the data point level, due to how this is made available in the dataView. It's great for lifting and shifting examples from the web, as the structures are similar for flat data, but you run into potential issues such as these. The table DVM also doesn't support cross-highlighting from other visuals, if that is important to you.
If you're looking for assistance beyond the above, anything that can help us get into your head where the code is concerned would be a great help, so if it is possible to provide a repo of your visual's code and some sample data I can check-out/test and see if there's anything I can recommend.
Otherwise, I would suggest approaching the visuals team directly for support - pbicvsupport@microsoft.com
Regards,
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 11 | |
| 6 | |
| 4 | |
| 4 | |
| 3 |