• MarkDataGuy

Automatically document your PowerBI Models with Model Documenter

Updated: 4 days ago

Hi There,

UPDATE - I have now produced a video about this process, so if you prefer to watch, head over to YT to check it out.

Recently when asked by a client about what was the best way to approach documenting a PowerBI model for end-users, it reminded me of a tweet about "Model Documentor" by Marc Lelijveld. Off I went to check it out, and it is awesome. When combined with utilization of the description property of Power BI Dataset fields and tables, and then published in a workspace or app in the PowerBI Service, you can have professional-looking model documentation produced in minutes.

Firstly, let's talk about Model Documentor. It is an open-source, external tool created by Marc Lelijveld. You download and install and you should be able to see it on your External tools ribbon in PowerBI Desktop.

So far, so good. To document a model, you open it in PowerBI Desktop and click on Model Documentor. That kicks off a process and after a few seconds, a new PowerBI model is created, which gets its data from an export of the metadata of the original model. A model of my model, neat. First impressions are great, you end up with a new PowerBI model and several pages of reports about the model.

However, what is really interesting is the underlying data model produced. Here, you see how Marc has built a comprehensive model that will allow you to create reports that suit your own purpose.

So, how can this be combined to create an end-user glossary? This was exactly what I was asked by a client recently, and I know of some people who have manually inserted additional pages into a PowerBI report with lots of text entries describing relevant fields and values. You can easily see how this quickly becomes a pain to maintain.

Instead, I adopted the following approach.

1) In PowerBI, take advantage of the description property of relevant tables, fields, and calculations. This can be done in the modeling panel of PowerBI, but you may find it a much faster experience in Tabular Editor.

2) Run Model Documentor via the External Tools menu. (This starts a process that takes a few seconds to run)

3) Step 2 will open a new instance of PowerBI Desktop, with a model based on the metadata in your source model. Save the model and publish the resulting Model to a target workspace. In my case, I add Glossay Model to the title of the model and then deleted the set of reports as I don't want the end-users to see the full model detail. Of course, this is entirely up to you.

4) I then created my own report using a live model connection to the published model (single page in this case) and published this report in my workspace.

5) Then I include this new report as part of the App that is used to share reports.

6) And now, as part of the app that I use to distribute reports, I have a page that users can use to find out more information about my model

Full credit to Marc @ DataMarc for creating this tool. A couple of things to finish things off. When you run Model Documentor, it outputs its data into a vpax (vertipaq) file on your local hard drive. As such, if you update your source model you will have to run the data modeler via external tools again, however as it only takes a few seconds, that is an easy task to do at the end of your developer changes.

I hope you find this of use. I know I am.

Thanks for reading


336 views0 comments
Original on Transparent.png