In Part 3 of this series, we created a model-driven app with Company and Company Product entities, forms and views. In this blog we will explore charts and dashboards and add them to our app.
- Login to PowerApp web portal and click on Apps from left navigation. Select Company Products app we created in Part 3 and click on Edit
- Click on Charts Button for Company entity in app designer. Click on Create New which will open Dynamics 365 Chart Designer.
- Select View as “Active Companies”, give a name to your chart. Select parameters for Y axis (Series) and X axis (category). Select type of chart using chart type icon. I have selected Pie Chart here
- Click on Save & Close. Newly create chart will appear in charts list. Select this chart
- Similarly create a bar chart “Active Products by Companies” for Company Products to show number of products by company as below
- Select Dashboards button in app designer. Click on Create New
- Select Classic Dashboard option, select 2-Column Regular Dashboard option and Click on Create
Note: With Unified interface option selected under App properties, you will be shown with 2 options for dashboards: Classic Dashboard and Interactive Dashboard. Refer blog for more details on Interactive Dashboard
- Dashboard designer screen will open in Dynamics 365. Give a name “Companies and Products Overview” to your dashboard.
- Select Section 1, Click on Chart option from top navigation. In Chart selection window, select Company as Record Type, View as Active Companies and Chart as “Companies currently active”. Click on Add
- Select Section 2, Click on List option from top navigation. Select Companies as Record Type and Active Companies as View. Click on Add
- Similarly, in Section 3 select List for Active Company Products for Company Product entity and in Section 4 select chart for Active Products by Companies. as shown below
- Click on Save and then Close
- “Companies and Products Overview” dashboard will appear in dashboards list. Select this dashboard and click on Save
Add dashboard to Sitemap:
We will add above created dashboard as default dashboard to Company entity in sitemap
- Click on arrow in Sitemap button and select Companies sub area in sitemap designer
- Select Dashboard as Type and “Companies and Products Overview” dashboard in Default Dashboard dropdown. Click on Save then Publish
- Click Save and Close now
- Validate and Publish app. Save and Close app
Run app in Dynamics 365:
- Select Company Products app from apps list and click on Play
- You will see app will run in Dynamics 365 with dashboard configured above