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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
giammariam
Solution Sage
Solution Sage

this.host.fetchMoreData() not working on initial load

I just wanted to share this in case anyone else runs into a similar issue. I am running powerbi-visuals-api v4.2.0. While implementing fetchMoreData() to pull in more than the default allowed 30,000 rows, I was running into an issue where upon initial load, nothing would appear. If I triggered an update (e.g. data filter), everything worked as expected. I could trigger multiple subsequent updates and the data and visual returned correctly, only the initial load was having an issue. After trying a bunch of different things, below is how I ended up solving it. The key ended up being to call refreshHostData() followed by update() on the initial load.

This thread was very helpful, especially the responses from @jppp and @dm-p 

 

            this._visualUpdateOptions = options;
            const dataView = options.dataViews[0];
            const lastCall = (dataView.metadata.segment) ? false : true;

            if (this._initialLoad) {
                this._initialLoad = false;
                if (!lastCall) {
                    this._visualUpdateOptions.dataViews[0].metadata.segment = true;
                    this._host.refreshHostData();
                    this.update(this._visualUpdateOptions);
                }
            }

            if (!lastCall) {
                let moreData: boolean = this._host.fetchMoreData();
                if ((moreData)) {
                    this._initialLoad = false;
                    this._segmentCounter += 1;
                    return;
                } 
            }

            console.log(`segments: ${this._segmentCounter}  rows: ${options.dataViews[0].table.rows.length}`)
            this._segmentCounter = 1;

 

 



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!
0 REPLIES 0

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors