pbi-doc-generator
Automatically generate data documentation from Power BI .pbix files
Reads a Power BI file and generates a self-contained HTML page documenting all data sources, transformation steps, table relationships, DAX formulas, and report visuals inside it.
This tool reads a Power BI file (.pbix or .pbip format) and automatically produces a self-contained HTML page that documents everything inside it. Power BI is a business intelligence tool from Microsoft used to build data dashboards and reports; the files it produces contain data connections, transformation logic, calculation formulas, and visual layouts, but none of that is easily readable without opening the application. This tool extracts all of it and turns it into readable documentation.
The output HTML page covers: where the data comes from (sources and parameters), how it is transformed before loading (the Power Query steps), how tables are related to each other (shown as an interactive diagram), all the DAX measures and calculated columns (DAX is the formula language Power BI uses), dependency chains between measures, calculation groups, and a page-by-page inventory of every visual on every report page. It also flags potential issues like unused measures, duplicate formulas, and bidirectional filters.
The simplest way to use it is to download a prebuilt Windows executable from the releases page, which requires no installation at all. There is also a graphical interface with a file picker for selecting your input file. For users who prefer running from source, Python 3.10 or later is needed, along with two dependencies: PBIXRay (a separate open-source library for reading .pbix files) and pandas.
The tool runs on Windows only, according to the README. The output uses GitHub-style CSS and Mermaid.js for the relationship and lineage diagrams, both of which are bundled into the single HTML file so it works without an internet connection after generation.
It is licensed under MIT and is in active development. Version 0.4 added the visual inventory feature, unused measure detection, and support for matching files in shared .pbip directories.
Where it fits
- Auto-generate documentation for a Power BI report so stakeholders can understand what data it uses and how, without opening Power BI Desktop.
- Audit a Power BI file for unused measures or duplicate formulas before handing it off to a client.
- Create an offline HTML reference of all DAX calculations and table relationships in a large Power BI project.