Forum Discussion
How to programatically interact with PBIR file?
Hi Guys,
I found this idea about PBIR file which can be programtically changed:
https://community.fabric.microsoft.com/t5/Fabric-Ideas/Button-to-Reload-Report-Layer-in-Power-BI-Desktop/idi-p/4689834#M160838
"
With PBIR is now possible to programatically modify the visual.json files to speed up the report design process. However, having to close and open the file to see the changes is time consuming and may even defeat the purpose of programatically modfying the visual.json files.
Automatic update like when a measure is created by an external tool would we awesome, but at the very least there should be some way of reloading the report layer without closing everything and reopening the file.
thank you!!"
What does it mean?
"With PBIR is now possible to programatically modify the visual.json"
Only code which i found is this:
https://www.esbrina-ba.com/pbir-scripts-to-replace-field-and-open-visual-json-files/?utm_source=chatgpt.com
and here this file is needed only to locate all visual jsons files.
If there is something else?
Best,
Jacek
Hi jaryszek ,
Yes the .pbir file mainly acts as a reference that helps Power BI locate and organize the report components such as visuals.json and other layout files.
It doesn’t contain the visuals themselves but points to where those files are stored inside the project. This structure makes it easier for developers to work programmatically with report definitions.
Thank you.
4 Replies
- v-menakakotaCommunity Support
Hi jaryszek ,
Thanks for reaching out to the Microsoft fabric community forum.The .pbir file is part of the new Power BI Project (.pbip) structure. It stores report details like visuals and layout in JSON format, so developers can now edit or script changes programmatically. When they say “programmatically modify the visual.json files”, it means you can use code or scripts to make changes directly in those files but currently, you still need to reopen the report to see the updates, as automatic refresh isn’t available yet.
Please go through the below document :
https://learn.microsoft.com/en-us/power-bi/developer/projects/projects-overview
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Community Support Team- jaryszekSuper User
Hello,
thanks.
I have checked developers' approach and there is a way in .NET to just open this file and read, but there is not a lot of information so this file is used to localize visuals.json files.
Am I right? Or I am missing something?
Best,
Jacek- v-menakakotaCommunity Support
Hi jaryszek ,
Yes the .pbir file mainly acts as a reference that helps Power BI locate and organize the report components such as visuals.json and other layout files.
It doesn’t contain the visuals themselves but points to where those files are stored inside the project. This structure makes it easier for developers to work programmatically with report definitions.
Thank you.