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

Power BI is not using $filter on a OData V4 source

Hi all,

I'm using Power BI to pull data from an OData v4 source.

The problem is my OData table is very big and the query takes more than 30 minutes.

When I debugged the rest requests that are being sent from Power BI to OData I can see that it doesn't use $filter in the queries. The filter is being done on all of the data after it comes back to Power BI.

This is the query in the advanced editor:

let
    Source = OData.Feed("http://localhost:8080/odata/v4/shared_spaces/1001/workspaces/1002/", null, [Implementation="2.0"]),
    runs_table = Source{[Name="runs",Signature="table"]}[Data],
    #"Expanded release" = Table.ExpandRecordColumn(runs_table, "release", {"name"}, {"release.name"}),
    #"Filtered Rows" = Table.SelectRows(#"Expanded release", each ([release.name] = "release 373.1"))
in
    #"Filtered Rows"

Do you know how I can make Power BI use $filter?

Thanks,

Adi

1 ACCEPTED SOLUTION

Hi Adi,

 

I can understand your issue but to limit the data you have to apply conditions before the Odata service itself. Power BI can do filter only once after loading the complete data.

View solution in original post

3 REPLIES 3
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

Didn't the filter make sense? Don't forget to click the "Close&Apply" button.

 

1.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @v-xicai ,

I used the filter like you showed. 

The problem is it filter after getting all the data from the OData resource.

Power BI didn't use $filter in the OData request and becuase of that the query takes a lot of time.

Adi

Hi Adi,

 

I can understand your issue but to limit the data you have to apply conditions before the Odata service itself. Power BI can do filter only once after loading the complete data.

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.