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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JoeFields
Frequent Visitor

How to limit OnTake to 100 rows in Custom Connector

I am trying to implement Table.View with a REST API but the API has a limit of 100 items per call. I saw PQ trying to fetch 200 items at a time which caused errors so I modified the OnTake handler as below but now it loads 100 rows and then has an error on row 101. I suspect this is because it is still trying to fetch 200 rows but only getting back 100 but how do I override the max number of rows requested?

 

OnTake = (count as number) => let newState = state & [Top = (if count > 100 then 100 else count)] in @View(newState),
3 REPLIES 3
Anonymous
Not applicable

Hi @JoeFields,

I'd like to suggest you take a look at following link about use power query handling pagination api if helps:

Handling paging for Power Query connectors - Power Query | Microsoft Learn
Regards,

Xiaoxin Sheng

Hello Xiaoxin, we are implementing paging already in our connector which works well but it is downstream from the OnTake so this would not resolve the issue. It appears that OnTake is set to receive a default of 200 items per page and there is not a clear way to override this default to a different value. If I cap OnTake to 100 results, we get errors because it is expecting 200 results.

Anonymous
Not applicable

HI @JoeFields,

I'd like to suggest you filter on the output result to limit the result amount instead of the directly overwrite the parameters. (current power bi data connectors does not include any writeback features)

So if these properties can't be configured/defined in the API request, it may means you also can't customize them at power bi desktop side.

Regaerds,

Xiaoxin Sheng

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.