cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Special character not working in Query/URL parameter

We are passing a query parameter in the URL for a PBIRS report to pre-filter the data for an Account. 

 

Account names with a & sign don't appear to be working though, even though it's encoded. 

 

 

Here's the actual URL

https://abc.com/Reports/powerbi/Account 360/A360TimeDashboard?rs:embed=true&filter=OrgDetails/AccountName eq 'AB&C'

 

Here's how it's getting passed post encoding

https://abc.com/Reports/powerbi/Account%20360/A360TimeDashboard?rs:embed=true&filter=OrgDetails%2FAc...AB%26C%27

 

Nothing seems to be working though. Is there a limitation on special characters? 

 

8 REPLIES 8
Highlighted
Frequent Visitor

Re: Special character not working in Query/URL parameter

Do you have solution for this? Same issue with us.

Highlighted
Frequent Visitor

Re: Special character not working in Query/URL parameter

same here..! Any solution?

Highlighted
Frequent Visitor

Re: Special character not working in Query/URL parameter

Any updates?

Highlighted
Anonymous
Not applicable

Re: Special character not working in Query/URL parameter

I used the same escape character format as this article explain. Replace the & with '_x0026_'

?filter table/column eq 'test '_x0026_' data'

The only problem I ran into was this seems to negate all other filters you pass in with the URL. This is the only one that comes through.

 

Hope this helps.

Highlighted
Microsoft
Microsoft

Re: Special character not working in Query/URL parameter

Hi All, Could you please help if there is any solution to this ? It doesnt seem to be working with unicode and we need this urgently.

 

@Anonymous , Did the example you showed worked ? It isnt working for me when I tried the same, it passed _x0026_ still as _x0026_

 

Highlighted
Regular Visitor

Re: Special character not working in Query/URL parameter

http://localhost/ReportsPBI/powerbi/General/ReportByProducts?filter=Product_x0020_Category/Product_x...

without url:   http://localhost/ReportsPBI/powerbi/General/ReportByProducts?filter=Product_x0020_Category/Product_x0020_Name eq 'XYZ' 

 

where:

'ReportByProducts' - name of report

'Product Category' - name of model. The space character replaced to "_x0020_"

'Product Name' - name of field. The space character replaced to "_x0020_"

eq  -  means equal

'XYZ' -  value for filtering

 

Highlighted
Microsoft
Microsoft

Re: Special character not working in Query/URL parameter

@volodymyrz, Thanks for the resopnse! 

Actually my query was what if there is special character like & in the filering value itself , for eg, 'X&YZ' 

 

I tried replacing it by %26 and it worked for me.

Highlighted
Frequent Visitor

Re: Special character not working in Query/URL parameter

Yes @rumittal  your response is a correct solution. Using the %26 for & worked for me but you do not need to use the unicode encoding for the spaces. The docs don't seem to say this and infact say the single quotation mark ' is the only thing you need to consider. 


Docs here seem to be wrong.

Helpful resources

Announcements
Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!