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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
dbeavon3
Impactful Individual
Impactful Individual

Sync slicers - how to determine visibility of the slicer visual in javascript embedded

I have a report with two pages and the "sync slicers" feature is enable to allow the slicer on the first page to affect the second page.  On the second page there is an "invisible" slicer that is not visible to users.  (I suppose this is how the sync slicer feature is supposed to work.)

 

Given that BI report, I'm using trying to use it in Power BI embedded.  I'd like to use javascript to auto-navigate to the page where the slicer is visible, and set the slicer state on that page.

 

However, if I enumerate the pages and visuals in the report, I find BOTH instances of the slicer (which is fine) but there appears to be NO WAY to determine which of them is currently visible.  The end result is that I don't have any way to know what page to navigate to. 

 

I'm starting by enumerating all the pages, and for each page I use the "getVisuals" function.

https://microsoft.github.io/PowerBI-JavaScript/classes/_src_page_.page.html 

 

As I inspect each of those visuals, there appears to be no property that would indicate if the slicer in question is visible or not:

https://microsoft.github.io/PowerBI-JavaScript/classes/_src_visualdescriptor_.visualdescriptor.html

 

I may be doing something wrong.  It seems like it should be easier to find the visible instance of the sync'ed slicer. Any tips would be appreciated.

0 REPLIES 0

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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