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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
barabum
Frequent Visitor

Analyzing Big Data

I have a dataset, containing products and categories (it is an example).

There are tens of millions of products and thousands of categories.

 

Every product has a category and other columns with additional data.

I want to build a report, which shows the number of products per category (bar chart).

When a user clicks on a category, I want to show products from that category in a separate table visual.

 

The problem is that the dataset  doesn't fit in 1GB limit.

 

I decided to split product columns into two tabless: one table contains columns, which are used for aggregation (category) and another table contains columns with additional data about a product.

There is 1:1 relationship between the tables.

 

I imported the first table to Power BI, because it was small. The second table was too big to be imported, so I decided to use Direct Query to load products from a category, when user selects it in the bar chart.

 

Unfortunatelly, Power BI ignores selected category and 1:1 relationship and tries to load additional data for all products (>10 millions). Is there a way to tell Power BI to use selected category and generate SQL with WHERE clause?

 

 

 

4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@barabum,

 

It seems to work. You may try using SQL Profiler.

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

Is it possible that PowerBI doesn't support filtering on SQL server side when there is a 1:1 relationsip?

 

For example, there is one to many relationship between Categories and Products and one to one relationship between Products and ProductsDetails.

User selects a category.

 

Expected behaviour:

- PowerBI filters Products by the category;

- using CompositeKey from filtered products, it loads data from ProductsDetails table (1:1 relationship).

 

Current behaviour:

- PowerBI loads data from ProductsDetails table for products from all categories and fails.

 

SQL Profiler is deprecated and doesn't work with Azure SQL Server.

I used sys.dm_exec_query_stats and sys.dm_exec_sql_text views to see actual ueries. They look like this one, where <ListOfColumns> are other columns:

 

 

SELECT TOP (1000001) 
[t12].[CompositeKey],<ListOfColumns> 
FROM ( (select [$Table].[CompositeKey] as [CompositeKey], <ListOfColumns> ) AS [t12] 
GROUP BY [t12].[CompositeKey],<ListOfColumns>

 

 

There is no WHERE clause in the query, so it tries loading all data.

Table component shows this error:

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

 

barabum
Frequent Visitor

Up

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Users online (2,049)