Our team has developed a detailed Power BI report that provides comprehensive insights into customer orders. To enhance the user experience and streamline workflows, users have requested seamless integration between Salesforce and Power BI. Specifically, when viewing an order record within Salesforce, users would like the ability to click on a specific order number and be automatically redirected to the Power BI report filtered to that exact order. This enables users to transition smoothly from Salesforce to Power BI while preserving context, eliminating the need for manual filtering and improving overall efficiency in order tracking and analysis.
Introduction;
Power BI is a powerful data visualization tool, and one of its lesser-known but highly impactful features is the use of URL string parameters for dynamic filtering. This feature allows you to pass filter values directly through the URL, enabling seamless integration with other systems like Salesforce and enhancing the user experience through pre-filtered reports.
A URL string parameter is a filter condition added to the end of a Power BI report’s URL. This allows users to open the report with certain filters already applied, eliminating the need to manually adjust filters after the report loads.
Syntax of a URL Filter
BaseURL&filter=tablename%2Ffieldname%20eq%20%27value%27
Multiple Vaues URL Parameter.
baseURL&filter=tablename%2Ffieldname%20in%20(%27value1%27,%20%27value2%27,%20%27value3%27) |
Example:
This example filters the report to only show data for the “2721” department in the “Account Team” table.
Why Use URL String Parameters?
Use Case: Salesforce Integration In one of our projects, the client wanted their Salesforce users to click on a customer record and be redirected to a Power BI report filtered to that customer. By embedding the customer’s unique ID into the Power BI report’s URL, we enabled a seamless experience where users didn’t need to manually filter the report after opening it.
Best Practices
Note:
_x0020_ is required if there is a space in the field name |
no special characters needed for spaces in field values, Example: If your table name is “Dim Employee” the syntax will be Dim_x0020_ Employee I usually build the URL Parameter using an excel file. Column C “Filtered Result” is my Final result. I make changes to each column based on the requirement for example column F which is the table name has a space in the table name, converted table name “Dim AccountOpsPnL” to “Dim_x0020_AccountOpsPnL“ |