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
byoungb
New Member

Clear Visual Selection via javascript embedded client api.

Okay so I have tried `clearSelectedVisuals` and I have no idea what it is designed to do... like maybe it is for something to do with edit mode or something... But here is my issue... if someone selects a row in a table or a bar in a chart (with or without other interactions with other visuals) I want to be able to clear that selection/interaction when another search is performed (via report.setFilters). I have moved all the slicers out of the report and into my application. In the past this was still an issue with a regular report but at least with a reset bookmark the selection/interaction could be cleared. And for vartious reasons I really do not want to use a bookmark state to do the same thing from the JS.

Any ideas on how I could accomplish this? Crazy that the api/sdk has methods to move visuals and features like that... and yet nothing to clear a selection/interaction.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @byoungb,

I check the documents but only find the function to reset Persistent filter, perhaps you can take a look the following document about persistent filters if helps:

Enable persistent filters in a Power BI embedded analytics application | Microsoft Learn

If the above not helped, you can also try to use JavaScript functions to store the original visual status, then you can use these at following operations to reset visual status.

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

HI @byoungb,

I check the documents but only find the function to reset Persistent filter, perhaps you can take a look the following document about persistent filters if helps:

Enable persistent filters in a Power BI embedded analytics application | Microsoft Learn

If the above not helped, you can also try to use JavaScript functions to store the original visual status, then you can use these at following operations to reset visual status.

Regards,

Xiaoxin Sheng

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.