Embedded Power BI - Form
#ModelDrivenApp, #PowerBI, #MDA, #PowerPlatform
Last updated
#ModelDrivenApp, #PowerBI, #MDA, #PowerPlatform
Last updated
Hi, How are you?
Thank you for your reading. Yesterday, I got a reporting requirement from the client.
I was thrilled when they wanted to know how we could make the 360 Customer view more insightful. And I told them we could make the Power BI tool with more data visualization, more analytics to create a comprehensive and engaging report that would reveal the customer's 360 view.
So, I designed a sample Power BI report that displays the customer's demographics, loan and contract details, and customer care data. Then, I embedded this Power BI in the main form of the table. The Power BI report will be set as the filter by the current customer. Creating and displaying a visualization in the Main form using OOB components in Dataverse is very challenging. That's why I opted for the Embedded Power BI solution. ☺️
Microsoft reference link: Embed a Power BI report in a model-driven app main form
My steps below and I used the app Power BI Embedder in XrmToolbox to embed the Power BI report in the Main form.
For instance, I have a report called "FE_Poc" - that displays the customer's demographics, loan and contract details, and customer care data. I will embed this report in the Main form of the Contact table. The report will be filtered by CustomerID (a field on the Contact table).
In the report, expand the Filter >> then add the field CustomerID under the section "Filter on all pages" >> then Save and Public report to Power BI Service.
With this filtering, all pages of this report will be filtered by CustomerID.
The next step, I opened my Solution >> opened main form Contact:
I added a new tab called Power BI
Then, I added a new section FE_Poc in this tab.
I will embed the Power BI report into the section FE_Poc under the Power BI tab.
Now, open the XrmToolbox >> then use the app Power BI Embedder.
Firstly, I need to find the Group ID and Report ID of the Power BI report "FE_Poc" for the configuration in the XrmToolBox
Configuration on the app Power BI Embedder:
Target section:
Entity: choose entity Contact
Form: choose the main form needed to embed the Power BI report
Tab: choose the tab on the main form
Section: chose section on the main form
Power BI Config section:
Method: set default value - Manual
Group ID: input the Group ID value of the Power BI report (above) My sample: 52b0871f-948e-41d8-97cb-0375566b7dd5
Report ID: input the Group ID value of the Power BI report (about) My sample: 6781e570-7f4d-400a-8231-c5ab898621a7
Page: input the value https://app.powerbi.com/reportEmbed?reportId=[[ReportID]] Sample: My Report ID = 6781e570-7f4d-400a-8231-c5ab898621a7 -> Page: https://app.powerbi.com/reportEmbed?reportId=6781e570-7f4d-400a-8231-c5ab898621a7
URL: input the value https://app.powerbi.com ---
Tick the field Filter -> to enable pre-filtering for the Power BI report. The filtering configuration is below:
PBI Table: select Power BI Dataset which contains the field "Customer ID" (used for pre-filtering).
PBI Column: select a column in the Power BI Dataset used for filtering (in Filter Pane).
CDS Field: select a column of the table Contact in Dataverse. This column will be used to filter the Power BI report.
Finally, just click Publish Report to finish and wait.... 🎉
Open a Contact - A Nguyễn Văn (CustomerID = C000001) -> The Customer ID auto filterred.
... and I check for another contact...
Yeah... with XrmToolbox, embedded the Power BI report so easily. Thank XrmToolbox, thanks Ivan Ficko author of Power BI Embedder app.
Thank you and hoping well... 🎉 [NTD]yns.asia