Forum Discussion
Filter Embedded Power BI report by URL
I want to embed a Power BI report in Microsoft Dynamics on the account screen. Is it possible for the embedded report to be dynamically filtered by the account URL, or another shared field in Power BI/dynamics?
Hey astano05 ,
For embedding a Power BI report in Microsoft Dynamics and dynamically filtering it based on the account URL or another shared field, yes, it's possible! You can use the Power BI embedding features with dynamic filtering via URL parameters or embedded report filters. The approches you can try:
URL Parameters: Power BI supports filtering reports using URL query parameters. You can pass the account ID or another relevant field as part of the URL when embedding the report. For example, you could pass the account's unique identifier as a parameter and set up a filter within Power BI to apply that value.
Example:
https://app.powerbi.com/reportEmbed?reportId=REPORT_ID&groupId=GROUP_ID&filter=Account/AccountID eq '12345'
Embedding in Dynamics: When embedding Power BI in Dynamics 365, you can use the "Power BI Embedded" feature in the interface. You can dynamically pass the account ID from the Dynamics 365 form into the report URL, ensuring that the report is filtered accordingly for the selected account.
Power BI Embedded API: If you're using custom code or development, you can leverage the Power BI JavaScript API to embed the report and apply filters programmatically based on the account ID or other fields.
By using these methods, the embedded Power BI report will dynamically display data filtered based on the account URL or another shared field from Dynamics 365.
For Detailed Information:
Power BI Embedded Documentation
Embedding Power BI in Dynamics 365
If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.
Best Regards,
Nasif Azam
5 Replies
- Nasif_AzamSuper User
Hey astano05 ,
For embedding a Power BI report in Microsoft Dynamics and dynamically filtering it based on the account URL or another shared field, yes, it's possible! You can use the Power BI embedding features with dynamic filtering via URL parameters or embedded report filters. The approches you can try:
URL Parameters: Power BI supports filtering reports using URL query parameters. You can pass the account ID or another relevant field as part of the URL when embedding the report. For example, you could pass the account's unique identifier as a parameter and set up a filter within Power BI to apply that value.
Example:
https://app.powerbi.com/reportEmbed?reportId=REPORT_ID&groupId=GROUP_ID&filter=Account/AccountID eq '12345'
Embedding in Dynamics: When embedding Power BI in Dynamics 365, you can use the "Power BI Embedded" feature in the interface. You can dynamically pass the account ID from the Dynamics 365 form into the report URL, ensuring that the report is filtered accordingly for the selected account.
Power BI Embedded API: If you're using custom code or development, you can leverage the Power BI JavaScript API to embed the report and apply filters programmatically based on the account ID or other fields.
By using these methods, the embedded Power BI report will dynamically display data filtered based on the account URL or another shared field from Dynamics 365.
For Detailed Information:
Power BI Embedded Documentation
Embedding Power BI in Dynamics 365
If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.
Best Regards,
Nasif Azam - Elena_KalinaSolution Sage
Hi astano05
Get the Account ID from Dynamics URL:
Dynamics URLs typically include the Account GUID (e.g., https://yourorg.crm.dynamics.com/main.aspx?etn=account&id=**8d9f3a2b-1c4d-5e6f-7g8h-9i0j1k2l3m4n**).Embed the Power BI Report with URL Filter:
Append the Account ID as a filter parameter to the Power BI embed URLhttps://app.powerbi.com/reportEmbed?reportId=YOUR_REPORT_ID&filter=Account/AccountId eq '8d9f3a2b-1c4d-5e6f-7g8h-9i0j1k2l3m4n'
Replace Account/AccountId with your Power BI dataset field name.
Add to Dynamics as a Web Resource:
Create an HTML web resource in Dynamics that:
Extracts the Account ID from the page URL.
Dynamically generates the Power BI embed URL with the filter.
Add the web resource to the Account form as a Custom Tab or Section.