Forum Discussion
Regarding URL filters
Hi,
I’m working on filtering a report (embeded report) by passing tableName, columnName, and values in URL and setting filters when rendering the report.
- The filter works fine for most columns, but I’m having trouble applying it for date columns.
- I can successfully filter on text.
- I’m not sure what the expected format for date values should be when passing them as filter parameters.
Questions:
- Is there a specific date format (e.g., YYYY-MM-DD or ISO 8601) that Power BI requires for filters?
- Do I need to handle date filters differently than text filters?
- If ranges are supported, how should I pass start and end dates?
Note : I'm not using ?filter query instead taking params and setting the filters during report render
PoovigaS Please refer the below documentation on how to filter for dates using the url
https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters#date-data-typesOData V4 format: filter=Table/Date gt 2019-05-20 OData V3 format: filter=Table/Date gt datetime'2019-05-20T00:00:00'Appreciate a Kudos !
Thanks,
Jai
7 Replies
- GeraldGEmerickSuper User
PoovigaS You can find the support date formats here: Filter a report using query string parameters in the URL - Power BI | Microsoft Learn
- PoovigaSRegular Visitor
I'm embedding a Power BI report in a custom application and applying filters via URL parameters — not using the ?filter query string directly. I parse the parameters and apply filters during report rendering using the Power BI JavaScript API.
Filtering works fine for text columns, but I'm having trouble applying filters to date columns. Here's what I've tried:
- Is there a specific format expected for date values in embedded filters?
- Does Power BI apply any internal transformation (e.g., rounding or averaging) for date picker columns?Are there known issues with filtering on Date/Time columns using IAdvancedFilter?
Any insights or suggestions would be greatly appreciated!
What' not working:
1) ?table=Agent Status&column=Agent Date&values=2025-09-02,2025-09-06&type=date-range
2) ?table=Agent Status&column=Agent Date&values=datetime'2025-09-02T00:00:00',datetime'2025-09-06T00:00:00'&type=date-range
What's working:
?table=Agent Status&column=Agent Name&values=CSR - Ashamad- v-tejramaCommunity Support
Hi PoovigaS ,
Based on the information, it appears you are utilizing a date range slicer along with a measure to count records within the selected date range. The card visual is returning a count of 3, which indicates that your DAX measure is functioning correctly and the model is filtering data according to the slicer selection.
If your measure is similar to:
CountWithinRange = COUNTROWS(YourTable)
or uses CALCULATE, it should be capturing the slicer context appropriately. In Power BI, applying a date column to a slicer will filter visuals using that field automatically, unless the filter context is explicitly removed.
If you are implementing more advanced logic, such as comparing two date fields or requiring dynamic date filtering, please share the specific DAX formula you are using. This will allow us to review and suggest any necessary improvements.
Please let me know if you encounter any discrepancies in the counts or if the measure does not respond as expected to slicer changes. I am available to assist further.
Please find the attached PBIX and Screenshort file for your reference.
Best Regards,
Tejaswi.
Community Support
- Jai-RathinavelSuper User
PoovigaS Please refer the below documentation on how to filter for dates using the url
https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters#date-data-typesOData V4 format: filter=Table/Date gt 2019-05-20 OData V3 format: filter=Table/Date gt datetime'2019-05-20T00:00:00'Appreciate a Kudos !
Thanks,
Jai