Introduction
Organizing your Power BI projects can save time, reduce confusion, and streamline team collaboration. One effective strategy is to separate your report definitions from your dataset models by placing them into dedicated folders within your Power BI workspace. This approach leverages the structure of the .pbip (Power BI project) file and the accompanying .model and .report folders to maintain a clear, modular project layout.In earlier blog we have talked about the PBIP file and source controlling of the PowerBI project. Refer from this link
Motivation behind the implementation
- Clear Ownership: Assign dataset models to data engineering teams, while business analysts focus on report design.
- Reusability: One dataset model can serve multiple reports, avoiding duplication and easing maintenance.
- Scalability: As projects grow, a modular folder layout helps onboard new team members and locate resources faster.
- Version Control: Storing models and reports in separate versioned folders (e.g., in Git) makes tracking changes simpler.
Designing Your Folder Layout in Power BI Workspace
In the Power BI service, workspaces allow folders for content. To reflect your project structure, consider creating two folders:
- Datasets
- Reports
s
) ensures they sort alphabetically. Teams can then publish or move items into the corresponding folder.Our goal is to create a structure in the workspace as below.
Let's get into the implementation.
Open the folder that contains the Power BI project. In my example, I have 2 reports called 01_Report and 02_Report. You can use any IDE I'm using Visual Studio Code for this example.
Let's create two folders called Dataset and Reports.
After the above step, lets put .Report folder into the Report Directory and .SemanticModel into the Dataset Directory. Now the project should look like below
Now we have to do some tweaks to the .pbip files and the .Report folder .pbir file. Below diagram will clarify the file dependency furthermore. One semantic model can have multiple .Report Files.
Lets do the change for 01_Report first. Open the 01_Report.pbip file using vscode. It should look like below. Look at the yellow colour box where the .report path specified.
Since we moved the .Report folder into the Reports directory this path should specify the relative path to the report file.
If we open the .pbip file now, we will be greeted with the below error. This is because we havent yet configure the model path.
Go to the 01_Report.Report folder inside the Reports directory and open up definition.pbir file and change the below path to reflect the .SemanticModel folder.
Since the Dataset folder sits on two directories up, you have to jump two directories up. and it should look like below.
Now you can do the same changes for 02_Report, report. (This might be a short indication that Power BI workspace is hosted on a linux machine 😉😉)
After this change, your workspace will look as expected.
Best Practices
- Consistent Naming: Prefix folders with numbers to control sort order.
- Documentation: Maintain a README in your repository explaining the folder layout.
- Access Controls: Set permissions at the folder level so only authorized users can modify datasets or reports.
- Versioning: Tag releases in Git corresponding to workspace deployments.