explaingit

djrien-ai/pbi-doc-generator

21PythonAudience · dataComplexity · 2/5LicenseSetup · easy

TLDR

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.

Mindmap

mindmap
  root((pbi-doc-generator))
    What it does
      Reads pbix and pbip files
      Generates HTML documentation
      Flags unused measures
    Output
      Data sources and parameters
      Power Query steps
      DAX measures and formulas
      Visual inventory per page
    Tech
      Python 3.10 plus
      PBIXRay library
      Mermaid.js diagrams
    Usage
      Windows executable
      Graphical file picker
      Run from source
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Auto-generate documentation for a Power BI report so stakeholders can understand what data it uses and how, without opening Power BI Desktop.

USE CASE 2

Audit a Power BI file for unused measures or duplicate formulas before handing it off to a client.

USE CASE 3

Create an offline HTML reference of all DAX calculations and table relationships in a large Power BI project.

Tech stack

PythonPBIXRaypandasMermaid.js

Getting it running

Difficulty · easy Time to first run · 5min

Windows only, a prebuilt executable is available so no Python installation is needed.

MIT, use, copy, modify, and distribute freely for any purpose, including commercial, as long as the copyright notice is kept.

In plain English

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.

Copy-paste prompts

Prompt 1
I have a Power BI .pbix file. Using pbi-doc-generator, how do I run it to produce an HTML documentation page that lists all my data sources, Power Query steps, and DAX measures?
Prompt 2
My pbi-doc-generator HTML output shows unused measures flagged. How do I identify and clean them up in Power BI Desktop?
Prompt 3
Explain the relationship diagram in the pbi-doc-generator output, what do the arrows between tables mean, and how do I fix a bidirectional filter warning?
Open on GitHub → Explain another repo

← djrien-ai on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.