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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
DavidAnthony
Frequent Visitor

Issue with "Back to Report" in Power BI Returning Limited Data Rows

Hello everyone,

I am experiencing an issue in Power BI when working with large datasets. Normally, the data retrieval works as expected: it fetches 30k rows initially and then increments by 30k rows with each fetchMoreData() call until the entire dataset (e.g., 105k rows) is loaded.

However, when I click the "Back to Report" button, it only returns 30k rows and stops. The fetchMoreData() method is not fetching additional rows as it should.

Here is the relevant snippet of the code:

if (!lastCall) {
    const moreData: boolean = this.host.fetchMoreData();
    if (moreData) {
        this._initialLoad = false;
        store.dispatch(setLoading(true));
        return;
    }
}

This issue occurs only after clicking "Back to Report" with datasets larger than 30k rows.

Has anyone encountered this issue before? Is there a way to ensure that fetchMoreData() continues working properly after returning to the report?

Any insights or solutions would be greatly appreciated. Thank you!

3 REPLIES 3
DavidAnthony
Frequent Visitor

 "dataViewMappings": [
    {
      "table": {
        "rows": {
          "select": [
            {
              "for": {
                "in": "y"
              }
            },
            {
              "for": {
                "in": "x"
              }
            },
            {
              "for": {
                "in": "v"
              }
            },
            {
              "for": {
                "in": "z"
              }
            }
          ],
          "dataReductionAlgorithm": {
            "window": {
              "count": 30000
            }
          }
        }
      }
    }
  ],

this is my dataView Mappings. i can't remove the setting "dataReductionAlgorithm": { "top": { "count": 1000000 } }. now the maximum returned data is only 30k, can't get more

Hi @DavidAnthony , Thank you for reaching out to the Microsoft Community Forum.

 

Your visual uses the window data reduction algorithm with a count of 30,000. To make fetchMoreData() work with window, ensure your update() method continues to request more data until fetchMoreData() returns false, even after navigation. Here’s the correct pattern:

public update(options: VisualUpdateOptions): void {

    const dataView = options.dataViews?.[0];

    const rowCount = dataView?.table?.rows?.length || 0;

 

    console.log(`Rows loaded: ${rowCount}`);

 

    if (!this._fetchInProgress && rowCount > 0) {

        const moreData = this.host.fetchMoreData();

        console.log(`fetchMoreData called: ${moreData}`);

 

        if (moreData) {

            this._fetchInProgress = true;

            store.dispatch(setLoading(true));

            return;

        }

    }

 

    this._fetchInProgress = false;

    store.dispatch(setLoading(false));

}

 

And keep this in your capabilities.json (as you already have it):

"dataViewMappings": [

  {

    "table": {

      "rows": {

        "select": [

          { "for": { "in": "y" } },

          { "for": { "in": "x" } },

          { "for": { "in": "v" } },

          { "for": { "in": "z" } }

        ],

        "dataReductionAlgorithm": {

          "window": {

            "count": 30000

          }

        }

      }

    }

  }

]

 

If it still doesn't work, make sure your internal flags like _fetchInProgress aren't being reset unexpectedly; confirm that you're using a recent Power BI Visuals API version (v3.4 or later is recommended) and ensure that the update() method is indeed being triggered after navigating back to the report.

 

If this helped solve the issue, please consider marking it “Accept as Solution” so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.

v-hashadapu
Community Support
Community Support

Hi @DavidAnthony , Thank you for reaching out to the Microsoft Community Forum.

 

This issue occurs because Power BI may reset the visual’s internal state when you navigate away and return. If your data-fetching logic isn’t correctly tied to the update() lifecycle, fetchMoreData() won’t continue loading additional rows. To fix this, call fetchMoreData() inside the update() method and control it using a simple flag to prevent redundant fetches:

public update(options: VisualUpdateOptions): void {

    const dataView = options.dataViews?.[0];

    const rowsLoaded = dataView?.table?.rows?.length || 0;

 

    console.log(`Rows loaded: ${rowsLoaded}`);

 

    if (!this._fetchInProgress) {

        const moreData = this.host.fetchMoreData();

        console.log(`fetchMoreData called: ${moreData}`);

        if (moreData) {

            this._fetchInProgress = true;

            store.dispatch(setLoading(true));

            return;

        }

    }

 

    this._fetchInProgress = false;

    store.dispatch(setLoading(false));

}

 

And make sure your capabilities.json allows Power BI to load large datasets:

{

  "dataViewMappings": [

    {

      "table": {

        "rows": {

          "for": { "in": "data" }

        },

        "dataReductionAlgorithm": {

          "top": { "count": 1000000 }

        }

      }

    }

  ],

  "objects": {}

}

 

This enables incremental loading beyond the initial 30k rows. Avoid relying on flags like lastCall or _initialLoad, since these may reset unexpectedly when navigating. Instead, base your logic on row count and the result of fetchMoreData().

 

If this still doesn’t solve the issue, verify your SDK version (pbiviz --version) and test in both Power BI Desktop and the Service, as behavior can vary slightly between environments.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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