Extract tabular model from PBIX file

pbi-tools Steps to extract a tabular model (.bim) TMSL file from an existing Power BI desktop (.pbix) file using pbi-tools.

  1. Download the latest version of pbi-tools.

  2. Extract the downloaded zip file. It includes the pbi-tools.exe executable which can be run directly from a command prompt (no installation required). Put the executable file somewhere convenient.

  3. Open a command prompt and cd to the folder containing your .pbix file

  4. Check your pbi-tools executable runs:

    "C:\Path\To\pbi-tools.exe"

    (you should see help text output).

  5. Extract the contents of your PBIX into a folder of the same name (without the .pbix extension)

    "C:\Path\To\pbi-tools.exe" extract YourReport.pbix

  6. Generate a .bim file from the extracted folder:

    "C:\Path\To\pbi-tools.exe" generate-bim YourReport

    The output TMSL file is YourReport.bim.