Forum Discussion
Publishing Power BI Project File to Fabric Workspace in Automated fashion
- 1 year ago
Hi everyone,
So as per my observation and checking few of the comments on the forum what I have concluded publishing the 'Power BI Project file (*.pbip)' has some issues (I was able to publish the same but it was not loading the data on the visuals), so I have skipped the pbip altogether and continuing with Power BI File (*.pbix).So basically I have created a script which takes in two arguments: workspace id and the report_file_path (and the POST API I am using the one that's been provided in the Microsoft documentation).
And for one of the sub-query that I had asked convering pbip to pbix: I am making use of Power AUtomate Desktop which opens the Power BI Desktop and saves it as: Power BI File (*.pbix)
So I will be closing this thread as I have found the solution.
Regards,
Sidhant.
Hi v-hashadapu ,
Thanks for the response, you are right in case of pbip the semantic model points out to the Semantic model stored on local (which is byPath) instead it should be pointed out to the Semantic Model in the respective workspace i.e. byConnection (live Connection).
So to do that I did a slight tweak in my code base wherein in the definition.pbir I gave the expected structure which is required (byConnection).
(I will just give a hort overview of my script so basically I had a zip file which had the Poweer BI Project (pbip) structure that includes the .Report, .SemanticModel, pbip file and I just renamed that from zip to pbip -> Then the extraction is done in a new folder (Report_name.pbip.extract) -> Then the respective semantic model is published and then the pbip file)
So after the script ran I was able to publish the pbip and the semantic model (made the respective changes in .pbir file), and I tried to open the pbip file (in the extracted local folder), but it threw the following error pop-up
So to cross check: I just opened the 'definition.pbir' file (inside the semantic folder), the structure seemed to be correct:
And the other thing was in Fabric workspace the report seem to have no data to show (blank)
Any idea what might be the cause for this.
Also for the conversion part from pbip to pbix I will try to post this on the Ideas forum so maybe in the upcoming updates this might be looked into, I just would have a small request just to give a Kudo to the same (will share the idea link here)
Regards,
Sidhant.
Hi Sidhant , Thank you for reaching out to the Microsoft Community Forum.
Thanks for the update and for digging into the details. You're absolutely right — switching the .pbir file to use byConnection is necessary when publishing a .pbip project via the REST API. Just to clarify though, once you make that change, Power BI Desktop won't be able to open the .pbip file anymore, since it only supports byPath references during development. So, the error you ran into when trying to open it locally is expected.
Regarding the report showing up blank in the workspace, this usually means the report isn’t connecting properly to the semantic model. I’d recommend double-checking that the dataset ID and name in your byConnection block exactly match the one you published. Also make sure the dataset has data, has been refreshed and that there aren’t any permission issues (like RLS) getting in the way. Sometimes even a small mismatch or an outdated layout file can cause visuals not to render.
And yes, regarding submitting this in Microsoft Fabric Ideas, that is a great way to influence future updates, make sure to get as many upvotes as possible.
If this helped solve the issue, please consider marking it “Accept as Solution” so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.