Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
OneWithQuestion
Post Prodigy
Post Prodigy

URL filters - can't seem to pass dates to filter?

I have tried following the instructions here: https://docs.microsoft.com/en-us/power-bi/service-url-filters but, I am obviously doing something wrong.

 

I hav my report, and I want to add a filter ?filter=

 

I want my table and field "Dates Lookup Table" and the field "Report Dt" to = '2019-04-24'.

 

However, I cannot seem to get that to work.  When I go to build the URL I am not coding the spaces properly apparently?

 

Additionally, when I leave a space in the URL for eq as in table/field eq '2019-06-24' that seems to fail as well as the URL gets rewritten in the browser to has out the spaces.

1 ACCEPTED SOLUTION

OK, I see my error.

 

My table name has a space in it, but I ONLY need to use the _x0020_ for spaces in table or field names.

 

I was trying to do that for every space in the URL or not do it at all.

 

So the last bit of my filter needed to be:
627/ReportSection/?filter=Employee_x0020_Info/Employee_x0020_ID eq 987

 

View solution in original post

3 REPLIES 3
v-xicai
Community Support
Community Support

Hi @OneWithQuestion ,

 

From the first link https://docs.microsoft.com/en-us/power-bi/service-url-filters#filter-on-multiple-fields, we know the dynamic URL filter have the structure : URL?filter=Table/Field eq 'value' , and it is different for reports in apps, you need to add " &'ctid=ctid " in the end, that will be

the structure: URL?filter=Table/Field eq 'value' &'ctid=ctid .

 

Why you add space in the URL? In your scenario, the code is like :URL?filter=Dates Lookup Table/Report Dt eq '2019-04-24' .

 

Or you can add "&" to connect the key characters, refer to the cases :

https://community.powerbi.com/t5/Desktop/URLs-Power-Bi-Desktop/m-p/717338/highlight/false#M346191 ,

https://www.kasperonbi.com/creating-a-hyperlink-with-filters-through-dax/.

Please understand that this link is provided “AS IS” with no warranties or guarantees of content changes, and confers no rights.

 

Or you could use the Filters pane on the report canvas instead of using dynamic URL filter.

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I am still not able to get this to work.

 

I'm using Chrome for my browser and I put together a simple test PBI report.

 

My URL is: 
https://app.powerbi.com/groups/me/reports/*censored*6627/ReportSection


Here is a screen shot of my tables with their names, and the report design surface.  I want to filter on Employee ID = 987.  So that only Jack Johnson's sales will show up.

 

However, when I try to construct a URL doing this, it does not work:

https://app.powerbi.com/groups/me/reports/*censored*6627/ReportSection?filter=Employee Info/Employee ID eq '987'

https://app.powerbi.com/groups/me/reports/*censored*6627/ReportSection?filter=Employee Info/Employee ID eq 987

What am I doing wrong?  I copy and paste either of those URLs, but the report does not filter.



PBI_URL_FILTER_EXAMPLE.PNG

OK, I see my error.

 

My table name has a space in it, but I ONLY need to use the _x0020_ for spaces in table or field names.

 

I was trying to do that for every space in the URL or not do it at all.

 

So the last bit of my filter needed to be:
627/ReportSection/?filter=Employee_x0020_Info/Employee_x0020_ID eq 987

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors