Forum Discussion
URL Query Parameter Escape Character %
I am having trouble with a the "%" escape character in a field Value. I am confident I have the syntax per the microsoft documentation correct (https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters), as I can get one escape character to work fine but not the other. Here is the situation:
DOESNT WORK: %25 Escape Character doesnt work
- Field Value: "% Efficiency"
- URL Generated:
- Query as modified by Chrome: filter=KPIDefinitions/KPI_x0020_Name%20eq%20%27%25%20Efficiency%27%20and%20KPIDefinitions/Report%20eq%20%27Golden%20Dataset%27
- PBI Service: As you can see chrome automatically replaces some of the query's escape characters, which is fine... but the filters don't work in Power BI Service.
WORKS: %23 Escape Character works fine
- Field Value: "# Referrals"
- URL Generated:
- Query as modified by Chrome: filter=KPIDefinitions%2FKPI_x0020_Name%20eq%20%27%23%20Referrals%27%20and%20KPIDefinitions%2FReport%20eq%20%27Golden%20Dataset%27
- PBI Service: As you can see the filters are applied.
Hi jake_BIV ,
This is an known issue , the ID is 343481950 .
Here's a workaround for your reference:
The syntax for escaping special characters is explained in the documentation: "Special characters and spaces in table and column names require more formatting. When your query contains spaces, dashes, or other non-ASCII characters, prefix those special characters with an escape code starting with an underscore and an X (_x), then the four-digit Unicode, then another underscore. If the Unicode is fewer than four characters, you need to pad it with zeroes. Here are some examples." So for example, the percentage (%) sign is _x0025_. Space is _x0020_. Here is an example:
- Example: filter=Table/_x0025__x0020_In_x0020_Name eq 'A'
- Example: filter=Table%2F_x0025__x0020_In_x0020_Name%20eq%20%27A%27
Result:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- jake_BIVHelper I
I submitted a ticket and Microsoft thinks it's a bug.
- lbendlinSuper User
The same question has been asked last week, without resolution. You can raise an issue at https://issues.powerbi.com . If you have a Pro license you can consider raising a Pro ticket at https://powerbi.microsoft.com/en-us/support/pro/
- v-yadongf-msftCommunity Support
Hi jake_BIV ,
This is an known issue , the ID is 343481950 .
Here's a workaround for your reference:
The syntax for escaping special characters is explained in the documentation: "Special characters and spaces in table and column names require more formatting. When your query contains spaces, dashes, or other non-ASCII characters, prefix those special characters with an escape code starting with an underscore and an X (_x), then the four-digit Unicode, then another underscore. If the Unicode is fewer than four characters, you need to pad it with zeroes. Here are some examples." So for example, the percentage (%) sign is _x0025_. Space is _x0020_. Here is an example:
- Example: filter=Table/_x0025__x0020_In_x0020_Name eq 'A'
- Example: filter=Table%2F_x0025__x0020_In_x0020_Name%20eq%20%27A%27
Result:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.