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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Mestu_Paul
Helper I
Helper I

Read current slice's state from all pages(active & inactive) of power bi embedded report

Hello good peoples,

I'm facing an issue where I can't read the slicer state of inactive pages in an embedded Power BI report.

Here's my use case:

  • I need to export a paginated report based on the Power BI report.
  • To do this, I need to set the parameters of the paginated report dynamically, which requires reading the current slicer state of the Power BI report.

Unfortunately, it seems the slicer state of inactive report pages cannot be accessed directly.

Does anyone have a workaround or solution to solve this issue? Any guidance or suggestions would be greatly appreciated.

Thank you!



1 ACCEPTED SOLUTION

Hi @Mestu_Paul  - Unfortunately, the dataSelected event doesn't trigger for range slicers. This is a limitation of the Power BI API. Since the API does not directly support range slicer event tracking, you can periodically check the state of the slicer using the getFilters() method.

you can integrate these ideas into your workflow as below:

1.Use getFilters() for range slicers and hierarchy slicers.
2.Store these states in a centralized object.
3.Track page changes:
4.Use the pageChanged event to capture slicer states before navigation.
5.Update paginated report parameters:
6.Pass the stored slicer states as parameters to the paginated report API.

 

If these approaches still don’t meet your needs, consider submitting feedback to Microsoft or raising a support ticket.

Get Help + Support in Power Platform - Power Platform | Microsoft Learn





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

4 REPLIES 4
johnt75
Super User
Super User

Use the sync slicers functionality to add the slicers to all pages of the report, but make them invisible on the pages where you don't actually want to see them.

rajendraongole1
Super User
Super User

Hi @Mestu_Paul  -Power BI typically doesn’t load the visual or filter context of inactive pages until they are activated.

 

you can try with synced slicers across pages if applicable.Optimal Solution: Design a centralized Master Page for slicers or use the Power BI JavaScript API to navigate inactive pages dynamically.
or use the Power BI REST API for exporting filtered data or visuals.

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thanks for your suggestions!

I also tried utilizing the embedded events.

  • Using the dataSelected event, I can track the hierarchy slicer state after each interaction. However, for the range slicer, I couldn't find any event to listen for changes.
  • I also experimented with the pageChanged event, but the issue is that this event fires after the page change, so I can't track the slicer state from the previous page once it becomes inactive.
  • Additionally, I tried the selectionChanged event, but the problem is that it only fires the first time and doesn't trigger on subsequent changes.

Hi @Mestu_Paul  - Unfortunately, the dataSelected event doesn't trigger for range slicers. This is a limitation of the Power BI API. Since the API does not directly support range slicer event tracking, you can periodically check the state of the slicer using the getFilters() method.

you can integrate these ideas into your workflow as below:

1.Use getFilters() for range slicers and hierarchy slicers.
2.Store these states in a centralized object.
3.Track page changes:
4.Use the pageChanged event to capture slicer states before navigation.
5.Update paginated report parameters:
6.Pass the stored slicer states as parameters to the paginated report API.

 

If these approaches still don’t meet your needs, consider submitting feedback to Microsoft or raising a support ticket.

Get Help + Support in Power Platform - Power Platform | Microsoft Learn





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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