Forum Discussion
Passing date range as URL Parameters is ignored
Hi all,
I create a specific Power BI report for doing an extensive selection of values/attributes and allow the user to call another report ans passing the params via URL. One of the attributes I need to pass is a from/to date combination which is calculated in the report for the selection. The report being called, contains a date table which should be filtered according to the from/to date I pass via an URL parameter.
The filter string that's being created is the following:
"filter=ReferenceDate/Date ge 2011-01-01 and ReferenceDate/Date le 2019-12-31"
However, when passing this to the target report, the filter is not applied. It works if I only pass one filter condition for the
reference date, but if I add both to select a range, the filter is not applied:
"filter=ReferenceDate/Date ge 2011-01-01" or "filter=ReferenceDate/Date le 2019-12-31"
Did anyone run into the same issues? Is this by design or is something wrong with my filter condition?
Thanks
3 Replies
- lbendlin
Super User
Something may be wrong with your filter definition.
The documentation has examples on how date values need to be presented for ODATA3 and ODATA4.
Filter a report using query string parameters in the URL - Power BI | Microsoft Learn
- pvbFrequent Visitor
Hi Ibendlin,
indeed, something might be wrong, but I don't know what. Passing one date works perfectly but I need to pass a filter between two days with a start and an end date for the same field in the date dimension. Unfortunately, there is nothing about that in the documentation.
- lbendlin
Super User
Which one woks and which one doesn't? ODATA3 or ODATA4? Have you tried using ISO-8601 format?