Thursday, June 11, 2020

Tips to filter Power BI report using query string parameters in the URL


With increasing usage of Power BI report, there is a case that users request to have a link on the SharePoint list to query all related information on the item. One example is as below.

One event list with all different events
Another publication list that have look up column linked to the event

The requirement is to have a link to the event list item that will display ALL the publications related to that event. The solution is to Filter a Power BI report using query string parameters in the URL as the screenshot below.


Here are some tricks and tips.

  1. Filter query string parameters only works on  Power BI service or apps. It does not seem to work on the URL embedded in SharePoint Online or WebSite.
  2. The query can work for hidden page, hidden fields
  3. Table and Field names are case-sensitive, value isn't.
  4. The query syntax is different for data type like Number or String. You need to add '' to the string value
  5. The last part in report URL like ‘?noSignUpCheck=1’ need to be removed before adding the filter
  6. You might need to change the special characters like space to %20

The example is like below.

This one will not work before removing the ‘?noSignUpCheck=1’.
https://app.powerbi.com/groups/9d999dde-1b4e-abcd-abce-xxxxxxxxxxxxxx/reports/01e1eb9e-abcd-4567-b500-xxxxxxxxxxxxxx/ReportSection1c9c48720016d813ded1?noSignUpCheck=1?filter=FACTPubsRecord/PubsMeetingID%20eq%201549

This will work.
https://app.powerbi.com/groups/9d999dde-1b4e-abcd-abce-xxxxxxxxxxxxxx/reports/01e1eb9e-abcd-4567-b500-xxxxxxxxxxxxxx/ReportSection1c9c48720016d813ded1?filter=FACTPubsRecord/PubsMeetingID%20eq%201549


You could use this URL to send specific query to end users or add the calculated column to SharePoint list.

No comments:

Post a Comment