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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

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 as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

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 as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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