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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

The result set of a query to external data source has exceeded power bi error power bi direct query

I am trying to calculate rank for a dataset connected via direct query. It is giving below error when adding rank measure to the table visuals, else data is loading. 

 

"the result set of a query to external data source has exceeded power bi error power bi direct query"

 

Rank = RANKX(ALLSELECTED(Query2[Value]),CALCULATE(SUM(Query2[sales])))
 
can you please help whta needs to be change to the measure to make it work.
 
 
1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous,

AFAIK, there's a limit of 1 million rows placed on the number of rows that can be returned in any single query to the underlying source when you work on direct query mode.
For this scenario, you may need to optimate the query (e.g. reduce category fields amount)to confirm these aggregated records are less than 1M rows.

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.