Forum Discussion
Issue with dates filters
- 7 years ago
Hi Anonymous ,
Your measure generates the following link:
https://app.powerbi.com/groups/6a4fa620-97e6-425b-ba79-1c9b9c209e68/reports/69ce2f6f-8fd7-4b5f-a758-98cbbb0064b6/ReportSectiond77d965cc24737ab52b1?filter=DIMSalesPerson/OfficeLocation eq 'USA' and DIMSalesPerson/City eq 'Seattle' and DIMShipper/ShipCompanyName eq 'United Package' and DIMProduct/CategoryName eq 'Dairy Products' and DIMSalesPerson/SalesPerson eq 'Davolio, Nancy' and DIMSalesPerson/SalesRegion eq 'WA' and Calendar/Date le 5/28/2017 and Calendar/Date ge 5/20/2015
According to Docs you are expected to use 'YYYY-MM-DD' or 'YYYY-MM-DDT00:00:00' date format:
https://docs.microsoft.com/en-us/power-bi/service-url-filters#date-data-types
I'd try changing date format.
Hi Sergiy
VAR oDate = if(ISFILTERED('Calendar'[Date]), "Time/Date le " & FORMAT(MAX('Calendar'[Date]),"YYYY-MM-DD") & " and Time/Date ge " & FORMAT(MIN('Calendar'[Date]),"YYYY-MM-DD"))how would you add quotes here, unless i am beng silly. I changed teh date format accordingly, but how do you get the quotes??
thannks..
i can see from my web URL there are no quotes on the date parameter.
- Anonymous7 years agoNot applicable
hi Sergiy
Just tried that and not working... ill up load a pbix file.
https://www.dropbox.com/s/e05l96vizdauusn/URL_Link_Test_File_7.pbix?dl=0
- Anonymous7 years agoNot applicable
any luck???
- Sergiy7 years agoResolver II
I did some tests.
I was wrong about using quotes. The Docs misled me.
The following links work as expected:
.........?filter=Projects/Date lt 2019-04-04
.........?filter=Projects~2FDate%20lt%202019-04-04
I tested links in a browser window
- Anonymous7 years agoNot applicable
Sergiy
Based on my test file how would you change the date parameters?