Forum Discussion
Power BI Report URL Query Parameter for Text Field
- 4 years ago
Hi v-janeyg-msft,
I figured out the issue!!
I first checked the other items you asked me to check (other reports, making sure the city field is text, etc.) and I couldn’t find any issues with that. Then I thought it might be an issue with my quote (since all the numeric fields that don’t require a quote works). And indeed it was!
I copied 'manager name' directly from the website documentation and it filtered!
Then I realized what my issue was! To make it easier to type the URL, I was first typing it in a Microsoft Word document and then coping and pasting the URL in the browser. But what was happening was that Microsoft Word by default changes “straight quotes” to “smart quotes”.
Notice how in the former the quote curves around the word while in the latter it’s a straight quote.
After I realized this, I changed it to use straight quotes, so now it works!
Thanks so much for your help on this!!! I really appreciate it! 🙂
Thanks so much for looking into this v-janeyg-msft! 🙂
It is very strange why it doesn't work for me. The conditions you pointed out are not an issue in my report.
When I put ?filter=TaskLog/TaskNumber eq 1521 as the query filter it properly filters and shows on the filter pane:
When I put ?filter=TaskLog/City eq ‘Hamilton’ as the query filter, the filter pane doesn't have the city and the table data are not filtered (the picture below shows only city of Hamilton but that's because this is test data ... but the data isn't being filtered):
Just to check if there was any issue with my field name I also tried this: ?filter=TaskLog/City eq 4
City is a text field, so this filter is obviously not valid, but with this, I actually get city added to the filter pane (though nothing is of course filtered) so there is nothing wrong with the table or field name:
Anyways, I created a work around for this by creating a different table with City and a City ID and added the numeric City ID to the url filter and it worked. Obviously that shouln't need to be done since text field filtering should work, but it's a workaround to deal with my immidiate issue. If I ever figure out what's causing this, I'll post a response here.
Hi, Lierreyy
I tested again on both edge and chrome browsers without any issues. So it shouldn't be a bug.
The problem should be with your report. You can arbitrarily test other reports on your pbi service to see if the text field can be properly filtered.
Secondly, please re-publish the report, or check whether there are RLS and other permission restrictions in the report. Check if your city field type is text.
What is your data source? Have you updated your desktop version to the latest?
If possible, please share some unsensitive data to help us clarify your scenario.
- Lierreyy4 years agoAdvocate I
Hi v-janeyg-msft,
I figured out the issue!!
I first checked the other items you asked me to check (other reports, making sure the city field is text, etc.) and I couldn’t find any issues with that. Then I thought it might be an issue with my quote (since all the numeric fields that don’t require a quote works). And indeed it was!
I copied 'manager name' directly from the website documentation and it filtered!
Then I realized what my issue was! To make it easier to type the URL, I was first typing it in a Microsoft Word document and then coping and pasting the URL in the browser. But what was happening was that Microsoft Word by default changes “straight quotes” to “smart quotes”.
Notice how in the former the quote curves around the word while in the latter it’s a straight quote.
After I realized this, I changed it to use straight quotes, so now it works!
Thanks so much for your help on this!!! I really appreciate it! 🙂