Problem Statement
As of Sep 4, 2024, one cannot convert a PBIX file to PBIP programmatically and can only be done manually using Power BI Desktop's File > Save As.
How can one convert the PBIX file to PBIP in an automated way?
Prerequisites
Power BI Desktop ( This needs to be installed in the system on which we plan to do the file conversion).
Solution
- Install the custom module by executing the below command.
Install-Module -Name PBIXtoPBIP_PBITConversion
- Now, the environment is set for us to execute the command for the file conversion.
PBIXtoPBIP_PBITConversion -PBIXFilePath "<<PBIXFilePath>>" -ConversionFileType "<<ConversionFileType>>"
Note
- There shouldn't be any other Power BI reports open for this to function
- Post the Powershell command execution, one should not make any work across the system on which the command is executed.
Output Results
This would avoid manually converting the PBIX files to PBIP.
Use Cases
One can extract the PBIX file format from the Power BI service via REST API and then leverage this Powershell module to convert the PBIX to PBIP. Thus allowing extraction of the PBIP file format from the Power BI service.