4. Customization of the Model Documenter - marclelijveld/External-Tools-Model-Documentation GitHub Wiki
The Power BI Model Documenter comes with a standardized Power BI Report. This report is automatically available to you by installing the Model Documenter tool. However, you might want to customize the Power BI Model Documenter by adding your own report template, including your own branding for example. The Model Documenter is completely open source and allows you to customize these specifics in an easy way. This page explains how you can customize the Power BI template file to your wishes.
Overal, cutomization requires a few steps listed below and elaborated in more detail on this page:
- Duplicate and customize Power BI Template file
- Duplicate pbitools.json file
- Get your own logo in
- Adjust refference to location of PBI template
The Model Documenter is triggerd as an external tool in Power BI Desktop. In order to do this, it requires to have an external tools file specified in a specific location being: C:\Program Files (x86)\Common Files\microsoft shared\Power BI Desktop\External Tools. The file in this location, is one of the elements we must customize in case you want to bring in your own template.
Furthermore, the Power BI template file is saved in this location: C:\Program Files (x86)\Common Files\Data-Marc\ModelDocumenter where you can easily upload additonal template files.
Below a step by step guide to customize both files.
The report template is a PBIT file (Power BI Template). It is recommended to use the file that comes with the Model Documenter as starting point. Simply create a copy of this file, or directly download the latest version from the GitHub repository.
Feel free to customize anything you want in the report layout. The data model behind the default setup can also be tailored to your wishes, but this is completely on your own risk. After making these changes, make sure you save your own Power BI template on the same location being: C:\Program Files (x86)\Common Files\Data-Marc\ModelDocumenter Further steps on how to save a Power BI file as a template can be found here.
In the external tools folder (C:\Program Files (x86)\Common Files\microsoft shared\Power BI Desktop\External Tools.) you will find the file related to your version of the Power BI Model Documenter. This file is called: Data-Marc_ModelDocumenter{ToolVersion}.pbitool.json_. First take a copy of this file and rename it to anything you like.
The structure of the file, includes the following properties:
- version
- name
- description
- path
- arguments
- server
- database
- filename
- pbitemplate
- iconData
To update this file, you can open the file in any text editor you like. Easiest is to use Notepad++, Visual Studio Code or just regular notepad.
The Name and Description can be updated to your wish. Make sure it at least has a different name than the Model Documenter by default has. If you created your own Power BI Template file, make sure you also update the pbitemplate argument and point it to the right file.
Last but not least, you can add your own icon, like your corporate logo in as a logo for the tool so you easily recognize the tool from the External Tools ribbon in Power BI Desktop. In order to do so, you must convert your logo into a BASE64 format. In order to do so, you could use the base64-image.de website to easily convert your image to the right format. After that, copy the format into the iconData property of the pbitool.json file.
Last but not least, make sure you save the updated pbitool.json file in the right location again and close all your active Power BI Desktop sessions. Restart Power BI Desktop and check if the new icon appears in the External Tools ribbon.