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, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Bodo
Helper I
Helper I

Automatic switching of pages from paginated reports in the Power Bi Service

Hi there,

 

I have created a paginated report and published it to the Power Bi Service. In the report there is a tablix that creates one page per group. You can now manually switch through the pages in the Power BI service. 

 

How do you configure that the pages in the Power BI service switch automatically every X seconds?

 

Or is there a way to start directly on the second page, for example?

Thanks
Bodo

4 REPLIES 4
LuizBarbosa
New Member

I faced a similar issue. I'm making Power BI dashboards available through public links and displaying them on TVs in our company. They need to update automatically, and of course, I wanted them to navigate through the tabs of the Power BI file automatically.

Here's the solution I implemented:

  1. Install the Tampermonkey Extension:

    • Download the Tampermonkey extension for your browser.
    • Select the extension and click on “Create a New Script”.
  2. Replace the Default Script with the Following Code:

    javascript
    // ==UserScript== //
    @name Power BI Page Switcher //
    @namespace http://tampermonkey.net/ //
    @version 0.5 //
    @description Automatically switch Power BI pages //
    @author You //
    @match YOUR_PUBLIC_LINK_HERE //
    @Grant none // ==/UserScript==
     
    (function() { 'use strict'; var delay = 10000; // Time in milliseconds (10000ms = 10s) var forward = true;
    function switchPage() {
    var nextButton = document.querySelector('button[aria-label="Next Page"]:not([aria-disabled="true"])'); // Exact location of the next button
    var prevButton = document.querySelector('button[aria-label="Previous Page"]:not([aria-disabled="true"])'); // Exact location of the previous button
    if (forward && nextButton) {
    console.log("Navigating to the next page");
    nextButton.click(); }
    else if (!forward && prevButton) {
    console.log("Navigating to the previous page"); prevButton.click(); }
    else {
    forward = !forward; // Reverse direction when reaching the end or beginning
    console.log("Reversing direction");
    }
    }
    setInterval(switchPage, delay);
    })();
  3. Adjust the nextButton and prevButton Locations:

    • You may need to adapt the nextButton and prevButton selectors based on your specific dashboard navigation buttons. Navigate to your navigation buttons, right-click and select "Inspect", then replace the HTML code with your own.

Hope this works for you. 

Bodo
Helper I
Helper I

Just in case someone encounters the same problem later. I have now found another way that works for my use case. I already filter the data in the SQL query so that only one page is returned for the report.

To do this, however, you first have to calculate for each data record on which page it will be displayed later in order to be able to filter afterwards in terms of time when only page 1 is displayed, when page 2 and so on.

The whole thing is quite cumbersome and would not have to be done if paginated reports would simply have the possibility to switch the pages automatically in the Power BI service.

v-xuxinyi-msft
Community Support
Community Support

Hi @Bodo 

 

This is not available in paginated reports at this time, but I think your idea makes sense and you can submit an idea for it at: Home (microsoft.com) and wait for users with the same needs as you to vote for you to help make it happen as soon as possible.

 

Hopefully this will be possible in a future release.

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-xuxinyi-msft 

I did submit the idea now. You can find it here:
https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=56ea4981-ffda-ee11-a73e-00224852272b

If someone else knows another solution in the meantime, I'm still interested 😉

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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

Top Solution Authors
Top Kudoed Authors