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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
andriikubrak
Frequent Visitor

Filters API does not work using SQL Server with DirectQuery and huge database

I am using SQL Server as a data source with DirectQuery. There is just one table with 6 fields that contains more than 100 million rows. My report contains one visual "Card" that should display count of values from particular field. This report is embedded on a web page. As I don't want to get count of all values I use Power BI API to filter by some name. My filter looks like this:

Snippet

var filter = {
    $schema: "http://powerbi.com/product/schema#advanced",
    target: {
        table: "MyTable",
        column: "MyColumn"
    },
    logicalOperator: "And",
    conditions: [
      {
          operator: "Contains",
          value: "FilteredValue"
      }
    ]
};

 The problem is that it doesn't get any result. I can see just loading spinner on my visual. I've tried the same filter for small database with 10 rows and it works as expected.

Any ideas?

2 REPLIES 2
Eric_Zhang
Microsoft Employee
Microsoft Employee


@andriikubrak wrote:

I am using SQL Server as a data source with DirectQuery. There is just one table with 6 fields that contains more than 100 million rows. My report contains one visual "Card" that should display count of values from particular field. This report is embedded on a web page. As I don't want to get count of all values I use Power BI API to filter by some name. My filter looks like this:

Snippet

var filter = {
    $schema: "http://powerbi.com/product/schema#advanced",
    target: {
        table: "MyTable",
        column: "MyColumn"
    },
    logicalOperator: "And",
    conditions: [
      {
          operator: "Contains",
          value: "FilteredValue"
      }
    ]
};

 The problem is that it doesn't get any result. I can see just loading spinner on my visual. I've tried the same filter for small database with 10 rows and it works as expected.

Any ideas?


@andriikubrak

Would the loading spinner finally finish and visual get loaded with data? I think is a performance issue which is limited by your Azure database service tier.

@Eric_Zhang

After waiting for half an hour loading spinner stopped and I got a message "Couldn't load the data for this visual" with Http Status Code: 500. What do you mean by Azure SQL Database? How is this related to my case if I use MS SQL Server as a database server? Is there possibilty that PowerBI doesn't handle such big data?

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.