cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

The resultset of a query to external data source has exceeded the maximum allowed size of '1000000'

Hi Community Users,

 

I am getting one error in Power BI desktop while pulling the dimension column in the table visual against a measure using direct query mode connected to snowflake database.

Error Message:
The resultset of a query to external data source has exceeded the maximum allowed size of '1000000' rows.

 

Whatever dimensions been pulled don't have much rows to think of it should throw more than 1 million records.

The same dimesion used in slicer and the measure is not throwing any error

 

Below find the dax definition used in measure :

 
NPI MIX Within BAT-Base Period =
var Start_date=min('Time Hierarchy'[Calendar Date])
var End_date=max('Time Hierarchy'[Calendar Date])

Var Base_Start_date=MIN('SPI Monitoring'[Base Period Start Date])
Var Base_End_date=MIN('SPI Monitoring'[Base Period End Date])

var max_month = CALCULATE(MAX('Time Hierarchy'[Month Number]), ALLSELECTED('Time Hierarchy'[Calendar Date]))

var SPI_BRAND_CATEGORY=CALCULATE(SUMX('SPI Net Sales Volume',[Net_Sales_Volume_SPI_Agg]*CALCULATE([Seasonality Cal],'VW_PRICE_MOVES'[END_MONTH_SELECTED]=max_month)),FILTER('SPI Net Sales Volume','SPI Net Sales Volume'[SPI_PRO.Product Category SPI]=SELECTEDVALUE('SPI Product'[Product Category SPI])),'Time Hierarchy'[Calendar Date]>=Base_Start_date && 'Time Hierarchy'[Calendar Date]<=Base_End_date)

Var SPI_BRAND_HOUSE=CALCULATE(SUMX('SPI Net Sales Volume',[Net_Sales_Volume_SPI_Agg]*CALCULATE([Seasonality Cal],'VW_PRICE_MOVES'[END_MONTH_SELECTED]=max_month)),FILTER('SPI Net Sales Volume',and(('SPI Net Sales Volume'[SPI_PRO.Brand House SPI]=SELECTEDVALUE('SPI Product'[Brand House SPI])),'SPI Net Sales Volume'[SPI_PRO.Product Category SPI]=SELECTEDVALUE('SPI Product'[Product Category SPI]))),'Time Hierarchy'[Calendar Date]>=Base_Start_date && 'Time Hierarchy'[Calendar Date]<=Base_End_date)
 
Var Brand_House_Brand_Category=IFERROR(SPI_BRAND_HOUSE/SPI_BRAND_CATEGORY,0)
 
return Brand_House_Brand_Category
 
 This dax measure was working fine and splitting across the dimensions previously but recently its not working also recently I have updated my Power BI desktop with latest version (May 2020) but don't know if it is happenning due to the latest Power BI release.
Power BI Version.PNG
 
Kindly help me how to resolve this issue and why I am getting the 1 million exceeded rows while pulling any of the dimensions related.
 
Regards,
Ashutosh Singh
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: The resultset of a query to external data source has exceeded the maximum allowed size of '10000

Hi @ashutosh_singh,

This is a known issue that appears on directquery mode datasource when it return rows more than 1M.

Use DirectQuery in Power BI Desktop#limitations-of-directquery 
This is caused by 'return' rows, have you apply any t-sql queries or functions that will increase the return row amount? (e.g. join functions)

In addition, it seems like you are nested multiple iterator functions in your measure which will multiple its row contents amount.
I'd like to suggest you try to remove them from your visual to confirm if this issue is caused by these multiplied row contents.
Notice: iterate tables will obviously increase the calculation table row contents amount.
for example, iterator three tables with 1k, 2k, 5k rows.
Actual calculated row contents= 1000*2000*5000=10^10 rows that obviously over 1M(10^6) rows.

Optimizing nested iterators in DAX 
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: The resultset of a query to external data source has exceeded the maximum allowed size of '10000

Hi @ashutosh_singh,

This is a known issue that appears on directquery mode datasource when it return rows more than 1M.

Use DirectQuery in Power BI Desktop#limitations-of-directquery 
This is caused by 'return' rows, have you apply any t-sql queries or functions that will increase the return row amount? (e.g. join functions)

In addition, it seems like you are nested multiple iterator functions in your measure which will multiple its row contents amount.
I'd like to suggest you try to remove them from your visual to confirm if this issue is caused by these multiplied row contents.
Notice: iterate tables will obviously increase the calculation table row contents amount.
for example, iterator three tables with 1k, 2k, 5k rows.
Actual calculated row contents= 1000*2000*5000=10^10 rows that obviously over 1M(10^6) rows.

Optimizing nested iterators in DAX 
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors