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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dbeavon3
Continued Contributor
Continued Contributor

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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