Forum Discussion
Filtering in Power Query Editor not working for OData source
- 7 years ago
This seems strange - it might be worth seeing whether query folding is taking place, and what your OData source actually returns, by using this technique: https://blog.crossjoin.co.uk/2018/05/03/troubleshooting-data-refresh-performance-issues-with-odata-data-sources-in-power-bi-and-excel-using-fiddler/
If that reveals that the filter is being passed back to the datas source but the data source isn't applying the data, you could try the following:
let Source = OData.Feed("https://REMOVED/", null, [Implementation="2.0"]), projects_table = Source{[Name="projects",Signature="table"]}[Data], buffer_table = Table.Buffer(projects_table), #"Filtered Rows" = Table.SelectRows(buffer_table, each ([IsArchived] = false)) in #"Filtered Rows"This should load the whole of the projects_table table into memory, stop any query folding and force the filter to take place in the Power Query engine. Hopefully the table isn't too big, otherwise this will be slow.
HTH,
Chris
This seems strange - it might be worth seeing whether query folding is taking place, and what your OData source actually returns, by using this technique: https://blog.crossjoin.co.uk/2018/05/03/troubleshooting-data-refresh-performance-issues-with-odata-data-sources-in-power-bi-and-excel-using-fiddler/
If that reveals that the filter is being passed back to the datas source but the data source isn't applying the data, you could try the following:
let
Source = OData.Feed("https://REMOVED/", null, [Implementation="2.0"]),
projects_table = Source{[Name="projects",Signature="table"]}[Data],
buffer_table = Table.Buffer(projects_table),
#"Filtered Rows" = Table.SelectRows(buffer_table, each ([IsArchived] = false))
in
#"Filtered Rows"This should load the whole of the projects_table table into memory, stop any query folding and force the filter to take place in the Power Query engine. Hopefully the table isn't too big, otherwise this will be slow.
HTH,
Chris
One more thing: it might be worth removing the [Implementation="2.0"] record in your first step to see if that affects the filtering.
Source = OData.Feed("https://REMOVED/"),See https://blog.crossjoin.co.uk/2018/06/27/odata-performance-power-bi/ for more details about this setting.
Chris