Forum Discussion
filter by date on Odata query
- 1 year ago
Please read the documentation. Use the Query parameter. You are still trying to stuff the filters in the base URL.
Sorry for the delayed response! First off, I should mention that I’m a newbie in Power Query and Power BI. Regarding your solution, does it pull all records from the server? While filtering after pulling the data helps, doesn’t that rely on local resources for filtering? Ideally, I’d prefer to use server-side resources for this filtering.
Hi venBI ,
Thanks for your response.
As you mentioned, filtering data after retrieval relies on local resources, whereas applying filters at the server level is more efficient.
To ensure that filtering happens on the server side while avoiding the dynamic data source issue, the best approach as suggested by lbendlin is to use Query parameters (Query=[...]) in OData.Feed instead of embedding filters directly in the URL. This allows Power BI to send filter conditions as parameters while keeping the base URL static, ensuring compatibility with scheduled refresh.
If your OData source supports query parameters, you can structure your request using the Query option with parameters like @StartDate and @EndDate, ensuring that Power BI handles filtering efficiently without violating refresh rules.
Let us know if you need further clarification!
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and a kudos would be appreciated.
Regards,
Vinay.