New Approach:
Attention: Microsoft added this feature out of the box, so that the manual approach below is not required anymore. More to this can be found here:
https://powerapps.microsoft.com/en-us/blog/power-bi-embedded-as-system-dashboard-in-model-driven-apps-preview/
Old Approach:
The general guideline on how to create a personal dashboard is described in this article:
https://docs.microsoft.com/en-us/powerapps/user/add-powerbi-dashboards
But what if you want to rollout a global PowerBI dashboard for all users?
With some tweaks you can manage it to make it work…
1. After you have created your personal dashboard you need to extract the formxml of that dashboard with this URL query in a browser tab:
https://org.crm4.dynamics.com/api/data/v9.1/userforms?$select=name,formxml&$filter=type eq 103 and name eq 'Ticket Status'
Replace…
type = 103 => PowerBi Dashboard
name = 'Your PowerBI Dashboard Name'
In the result copy the XML part out of the "formxml" property and replace the \" characters with double quotes ":
"formxml":"<form><tabs><tab showlabel=\"false\" verticallayout=\"true\" id=\"{79c2fe56-9774-4fcc-82d9-15be85cb49b6}\"> <labels><label description=\"Tab\" languagecode=\"1033\" /></labels><columns><column width=\"100%\"> <sections><section showlabel=\"false\" showbar=\"false\" columns=\"111\" id=\"{17a1f9a6-0a04-4662-8d47-05cecb80b3a7}\"> <labels><label description=\"Section\" languagecode=\"1033\" /></labels><rows><row><cell colspan=\"3\" rowspan=\"24\" showlabel=\"false\" id=\"{a294c3cf-aab6-482d-99e9-ed67cb0db353}\" availableforphone=\"false\"><labels /> <control id=\"Component04cd521\" classid=\"{8C54228C-1B25-4909-A12A-F2B968BB0D62}\"><parameters> <PowerBIGroupId>12369285-0b8a-4760-89fa-bfb62f0bf123</PowerBIGroupId> <PowerBIDashboardId>123bb8a5-5d15-4c62-a936-44fc7e202123</PowerBIDashboardId> <TileUrl>https://app.powerbi.com/dashboardEmbed?dashboardId=123bb8a5-5d15-4c62-a936-44fc7e202123&config=123jbHVzdGVyVXJs...%3d</TileUrl> <Type>1</Type></parameters></control></cell></row></rows></section></sections></column></columns></tab></tabs></form>2. Create a new solution:
3. Add a new dashboard to your solution
4. Export your solution
5. Unzip Solution file
6. Open the customization.xml file in your favorite editor tool
7. Search for the <Dashbard> Tag
8. Search for your localized dashboard name
9. Move forward to the <FormXml><forms type="dashboard"> tags
10. Replace the content and tags starting from <form> until you reach </form> tag.
11. Copy the formxml from the retrieved web api userform request of the first step above and put in between the <forms type="..."> ... </forms> tags.
12. Now change the form tab label id and the section label id by e.g. replacing the last number with a new number:
Form label id:
Section label id:
13. Save the customization.xml file and ZIP again the solution file
14. Import and publish your customized solution.
15. Check if it works
Sample
<Dashboards> <Dashboard> <LocalizedNames> <LocalizedName description="Technician Timesheet" languagecode="1033" /> </LocalizedNames> <FormId>{e804f424-7488-ea11-a811-000d3aa96894}</FormId> <IsCustomizable>1</IsCustomizable> <IsDefault>0</IsDefault> <FormXml> <forms type="dashboard"> <form> <tabs> <tab showlabel="false" verticallayout="true" id="{79c2fe56-9774-4fcc-82d9-15be85cb49b6}"> <labels> <label description="Tab" languagecode="1033" /> </labels> <columns> <column width="100%"> <sections> <section showlabel="false" showbar="false" columns="111" id="{17a1f9a6-0a04-4662-8d47-05cecb80b3a7}"> <labels> <label description="Section" languagecode="1033" /> </labels> <rows> <row> <cell colspan="3" rowspan="24" showlabel="false" id="{a294c3cf-aab6-482d-99e9-ed67cb0db353}" availableforphone="false"> <labels /> <control id="Component04cd521" classid="{8C54228C-1B25-4909-A12A-F2B968BB0D62}"> <parameters> <PowerBIGroupId>12369285-0b8a-4760-89fa-bfb62f0bf123</PowerBIGroupId> <PowerBIDashboardId>123bb8a5-5d15-4c62-a936-44fc7e2028f4</PowerBIDashboardId> <TileUrl>https://app.powerbi.com/dashboardEmbed?dashboardId=125bb8a5-5d15-4c62-a936-44fc…&config=eyJjbHVzdGVyVXJsIjoiaHR0…0%3d</TileUrl> <Type>1</Type> </parameters> </control> </cell> </row> </rows> </section> </sections> </column> </columns> </tab> </tabs> </form> </forms> </FormXml> <IntroducedVersion>5.0.0.16</IntroducedVersion> <IsTabletEnabled>0</IsTabletEnabled> </Dashboard> </Dashboards>Now your report appears in the system dashboard section!
Further advantage is that you can configure the security roles valid for this report
Comments
Post a Comment