Steps to extract a tabular model (
.bim) TMSL file from an existing Power BI desktop (.pbix) file using pbi-tools.
Download the latest version of pbi-tools.
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.
Open a command prompt and cd to the folder containing your .pbix file
Check your pbi-tools executable runs:
"C:\Path\To\pbi-tools.exe"
(you should see help text output).
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
Generate a .bim file from the extracted folder:
"C:\Path\To\pbi-tools.exe" generate-bim YourReport
The output TMSL file is YourReport.bim.