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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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