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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.