Run a Power BI PBIP Report as Code
Clone and run a banking analytics report using Power BI as code with TMDL.
Introduction
30 Second Summary
Every time you share a Power BI report as a .pbix file, you're sharing a binary blob. You can't review what changed, you can't track history, and collaboration means emailing versions back and forth. Professional analytics teams solve this by storing their reports as code files that Git can track.
In this project, you will clone a professional banking analytics report stored entirely as readable code files, explore its structure in Antigravity IDE, and run it locally in Power BI Desktop with 36 months of synthetic data.
What You'll Build
A local, running instance of a 3-page banking performance dashboard powered by a star-schema model with 22 DAX measures, loaded from a source-controlled PBIP repository.
By the end of this project, you'll have:
- A cloned PBIP monorepo explored through Antigravity IDE, with full visibility into how Power BI reports exist as reviewable code files.
- Power BI Desktop installed and configured with PBIP/PBIR preview features enabled for working with the modern "Power BI as code" format.
- A running 3-page banking performance report refreshed with local synthetic data covering transaction volumes, digital adoption trends, and branch-level NPS scorecards.
- Secret Mission: Modify a DAX measure directly in the TMDL code files and see your change reflected live in Power BI Desktop.
Are there any prerequisites?
You need a Windows 10 or later machine (64-bit) with an internet connection. Power BI Desktop is Windows-only, so macOS and Linux are not supported for this project.
You should already have Antigravity IDE and Git installed. No prior Power BI experience is required.
Install Power BI Desktop and Verify Your Tools
This project uses Power BI Desktop to open and run a banking analytics report that lives entirely as code files on your machine.
Power BI Desktop is Microsoft's free tool for building and viewing interactive data reports. In this step, you'll install it, turn on two preview features that let it read the modern code-based report format, and confirm your existing tools are ready to go.
In this step, get ready to:
- Install Power BI Desktop from Microsoft Store.
- Enable PBIP and PBIR preview features.
- Verify Antigravity IDE and Git are working.
Install Power BI Desktop from Microsoft Store
Power BI Desktop is a Windows application you install from the Microsoft Store. The Microsoft Store keeps it automatically updated with each monthly release.
- Press the Windows key to open your search bar.
- Type Microsoft Store and press Enter to open it.
- In the Microsoft Store search bar at the top, type Power BI Desktop.
- Click Power BI Desktop in the search results (published by Microsoft Corporation).
- Click Get or Install to begin the download.
Already have Power BI Desktop?
If the Microsoft Store shows an Open button instead of Get, Power BI Desktop is already installed. Click Open and skip ahead to the next substep.
- Wait for the installation to complete. This is approximately a 650 MB download.
- Once installed, press the Windows key, type Power BI Desktop, and press Enter to launch it.
- When the welcome screen appears, close it by clicking the X in the corner of the welcome dialog. Sign-in is optional for local use.
What is Power BI Desktop?
Power BI Desktop is Microsoft's free desktop application for creating interactive reports and dashboards. It connects to data sources, lets you build data models, and produces visual reports you can share with your team.
You should see Power BI Desktop open to a blank canvas with the ribbon toolbar visible across the top.
Power BI Desktop won't install?
Make sure you are running Windows 10 or later (64-bit). Power BI Desktop does not run on macOS or 32-bit Windows.
If the Microsoft Store shows an error, try searching for the app again or restarting your machine.
help me troubleshoot my Power BI Desktop installation
Enable PBIP and PBIR preview features
The report you'll open in this project is stored in PBIP format (Power BI as code). Two preview features must be enabled for Power BI Desktop to read these files.
Why are these features required?
PBIP and PBIR are modern formats that store Power BI reports as plain-text code files instead of a single binary .pbix file. This makes reports reviewable in version control, just like application source code.
Without these preview features enabled, Power BI Desktop cannot open the project file. The repository README warns that skipping this step may cause Desktop to refuse to open the project or show an empty report with no pages.
- In Power BI Desktop, click File in the top left corner.
- Click Options and settings.
- Click Options.
- In the left panel of the Options dialog, under the GLOBAL section, click Preview features.
- Check the box next to Power BI Project (.pbip) save option.
- Check the box next to Store reports using enhanced metadata format (PBIR).
- Click OK.
- When prompted to restart, close Power BI Desktop and reopen it from the Start menu.
Features already checked?
If both boxes are already ticked when you arrive at the Preview features page, the features are already enabled. Confirm both are checked and click OK. No restart is needed.
After restarting, confirm the features are still enabled by navigating back to File > Options and settings > Options > Preview features. Both checkboxes should remain ticked.
Don't see the preview features listed?
Make sure you installed Power BI Desktop from the Microsoft Store (not an older standalone installer). The Store version is always the latest monthly release with all available preview features.
If the checkboxes are missing, try updating Power BI Desktop through the Microsoft Store to get the latest build.
help me find the PBIP and PBIR preview features in Power BI Desktop
Verify Antigravity IDE and Git
With Power BI Desktop ready, let's confirm your development environment. Antigravity IDE is where you'll explore the report's code files, and Git is how you'll download the repository.
- Switch back to Antigravity IDE.
- Open the integrated terminal by pressing Ctrl+` (the backtick key, usually located above Tab).
- Check your Git version by running this command:
git --version
You should see output similar to git version 2.54.0.windows.1.
Don't see a version number?
If the terminal shows a "command not found" or "not recognized" error, Git may not be installed or may not be in your system PATH. Try closing and reopening Antigravity IDE to refresh the PATH, then run the command again.
help me fix git not being recognized in my Antigravity IDE terminal
Your tools are installed and configured. Next, you'll clone the banking analytics repository and start exploring its code structure in Antigravity IDE.
Clone the Repository Using Antigravity IDE
Your tools are ready to go. Power BI Desktop is installed, both preview features are enabled, and Git is confirmed working in your terminal.
Now it's time to get the actual report code onto your machine. You'll clone a GitHub repository that contains a full banking analytics report stored entirely as code files.
In this step, get ready to:
- Clone the datapot-fabric-agent-demo repository to your local machine.
- Open the project folder in Antigravity IDE to browse its structure.
Clone the repo
The banking report lives in a public GitHub repository. Cloning it downloads all the report files, data model definitions, and synthetic data to your local machine.
- In the Antigravity IDE terminal from earlier, navigate to your Documents folder by running this command:
cd ~\Documents
- Clone the repository by running this command:
git clone https://github.com/DatapotAnalytics/datapot-fabric-agent-demo.git
- Move into the cloned folder by running:
cd datapot-fabric-agent-demo
- Confirm the clone succeeded by running:
ls
You should see folders like docs, reports, and shared, plus files like README.md in the output.
Seeing a network error or 'fatal: could not create work tree'?
Make sure you ran cd ~\Documents first. If the Documents folder does not exist, create it or use another folder you have write access to.
If you see a network error, check your internet connection and try the clone command again.
Help me troubleshoot the git clone command
Open the project folder in Antigravity IDE
With the files on disk, you need to open the folder as a workspace so the Explorer panel shows the full file tree.
- In Antigravity IDE, click File in the top menu bar.
- Click Open Folder.
- Navigate to Documents and select the datapot-fabric-agent-demo folder.
- Click Select Folder.
The Explorer panel on the left now displays the full repository structure. You should see top-level folders like docs/, reports/, shared/, and files like README.md, CONVENTIONS.md, and CLAUDE.md.
Why is there a CLAUDE.md file?
This repository is designed for AI-assisted development workflows. The CLAUDE.md file contains instructions that AI coding agents use to understand the project's conventions. You don't need to do anything with it for this project.
Don't see the folder structure?
Make sure you selected the datapot-fabric-agent-demo folder itself, not the Documents folder above it. The Explorer panel should show the repo contents at the top level.
If Antigravity IDE asks whether you trust the authors of the files, click Yes, I trust the authors to proceed.
Help me troubleshoot opening the folder in Antigravity IDE
Your repository is cloned and open. Next up, you'll explore the PBIP folder structure to see how a Power BI report lives as plain-text code files.
Explore the PBIP Repository Structure
You've cloned the repository and opened it in Antigravity IDE. Now it's time to understand what's inside.
A traditional Power BI report lives inside a single binary .pbix file that you can't read or review in a code editor. The PBIP format breaks that binary apart into readable text files. In this step, you'll explore those files to see exactly how a Power BI report looks as code.
In this step, get ready to:
- Map the monorepo's top-level folders and their purposes.
- Explore TMDL model files and PBIR report files inside the report's PBIP folder.
- Review the synthetic dataset and its contract documentation.
Understand the monorepo layout
This repository is a monorepo. It holds multiple reports, shared assets, and documentation all in one place.
- In the Antigravity IDE Explorer panel on the left, expand the top-level folders.
- Note the three main folders:
- Click on README.md in the Explorer panel to open it in the editor.
- Read through the repository overview to see how the project is described.
What is a monorepo?
A monorepo is a single Git repository that holds multiple related projects. Instead of scattering each report into its own repo, a monorepo keeps everything together so teams can share documentation, themes, and conventions across all reports.
Explore the report's PBIP structure
The actual Power BI report lives inside a pbip/ folder. This folder contains the project entry file, a semantic model folder, and a report folder.
- In the Explorer panel, navigate to reports/01-branch-channel-performance/pbip/ by expanding each folder.
- Note the three items inside:
- Expand BranchChannelPerformance.SemanticModel/definition/tables/.
- Click on any .tmdl file to open it in the editor.
You should see plain-text definitions of tables, columns, and DAX measures. This is human-readable code, not a locked binary.
What is TMDL?
TMDL stands for Tabular Model Definition Language. It's the plain-text format that describes your data model: tables, columns, relationships, and DAX measures.
Because each table is its own .tmdl file, you can review changes in Git diffs the same way you'd review code.
- Now expand BranchChannelPerformance.Report/definition/pages/.
- Notice that each report page is a separate folder containing JSON files.
- Click on any .json file inside a page folder to see how visuals are defined.
What is PBIR?
PBIR is the enhanced report metadata format. It stores each report page and visual as separate JSON files instead of one giant blob.
This makes it possible to see exactly which visual changed in a pull request, without decoding a binary file.
Explore the dataset
The report's data lives alongside the code in a dedicated dataset folder. This keeps everything self-contained and portable.
- In the Explorer panel, navigate to reports/01-branch-channel-performance/dataset/raw/.
- Note the Excel/CSV files containing the synthetic banking data. This is 36 months of AI-generated data covering January 2023 through December 2025.
- Navigate back up to reports/01-branch-channel-performance/dataset/ and click on DATASET-CONTRACT.md to open it.
- Read through the contract to understand the data schema. This document describes what each table and column contains.
Why a dataset contract?
A dataset contract is a written agreement about what the data looks like: column names, data types, expected ranges, and update frequency. It prevents surprises when someone changes the source data and breaks the report.
What about the star schema?
This report uses a star schema with 6 dimension tables, 3 fact tables, and a disconnected measures table holding 22 DAX measures. You can see each of these as individual .tmdl files in the SemanticModel folder.
Take a moment to appreciate what you're looking at. Every piece of this Power BI report exists as a readable text file. The model is TMDL. The visuals are JSON. The data is Excel/CSV. There's no locked-down binary anywhere.
You now know where everything lives in this repository. Next up, you'll open the report in Power BI Desktop and connect it to the local data so the visuals come alive.
Open the Report and Configure the Data Source
You've explored the repository and seen how Power BI reports can live as plain-text code files. Now it's time to bring those files to life by opening the actual report in Power BI Desktop.
The report uses a parameterized data source, which means you need to tell it where your local data lives before anything will display. Once configured, the report loads 36 months of synthetic banking data and populates all the visuals.
In this step, get ready to:
- Open the PBIP project file in Power BI Desktop.
- Configure the DataFolder parameter to point to your local data.
- Refresh the report and verify that visuals populate with data.
Open the PBIP file in Power BI Desktop
The .pbip file is the entry point for a Power BI project. Double-clicking it launches Power BI Desktop in project mode instead of the traditional .pbix mode.
- Open File Explorer on Windows (press the Windows key and type File Explorer).
- Navigate to the folder where you cloned the repository. If you followed the earlier step, this is C:\Users\%USERNAME%\Documents\datapot-fabric-agent-demo.
- Open the subfolder reports\01-branch-channel-performance\pbip\.
- Double-click BranchChannelPerformance.pbip.
- Power BI Desktop opens and loads the project. Check the title bar to confirm it shows the project name, not a .pbix filename.
Why File Explorer instead of Antigravity IDE?
The .pbip file is registered with Power BI Desktop as its handler. Double-clicking in File Explorer triggers the system file association, which opens the project directly in Power BI Desktop.
Opening it from Antigravity IDE's file tree would just show the raw JSON content of the file in a text editor.
Report won't open or shows no pages?
If Power BI Desktop refuses to open the project or shows a message like The report has no pages, this means the PBIP and PBIR preview features are not enabled. Return to Step 1 and confirm both checkboxes are ticked under Preview features.
help me fix Power BI Desktop not opening my .pbip project file
Set the DataFolder parameter
The report's data source is parameterized. Instead of a hardcoded path, it uses a parameter called DataFolder that you set to the location of the raw data on your machine.
- In Power BI Desktop, click Home on the ribbon.
- Click Transform data, then select Edit parameters from the dropdown.
- In the DataFolder field, enter the absolute path to the raw data folder inside your clone.
Your path follows this pattern:
[[DATAFOLDER="C:\Users\YourName\Documents\datapot-fabric-agent-demo\reports\01-branch-channel-performance\dataset\raw"]]
How do I find my exact path?
Open File Explorer and navigate to the raw folder inside reports\01-branch-channel-performance\dataset\. Click the address bar at the top to reveal the full path, then copy it.
- Click OK.
- If Power BI Desktop shows a banner prompting you to apply changes, click Apply Changes.
Seeing a data source error?
Make sure the path uses backslashes (\) and points to the raw folder specifically, not its parent dataset folder. The path must end with \raw.
Also confirm the folder actually contains data files. You can check in Antigravity IDE by expanding reports/01-branch-channel-performance/dataset/raw/ in the Explorer panel.
help me fix the DataFolder parameter path for my Power BI PBIP project
Refresh the data
With the parameter configured, Power BI Desktop now knows where to find the data files. Refreshing pulls all 36 monthly partitions of synthetic banking data into the model.
- On the ribbon, click Home and then click Refresh.
- Wait for the refresh to complete. This loads data from January 2023 through December 2025.
Once the refresh finishes, the report visuals populate with data. You should see charts, KPI cards, and tables displaying banking performance metrics.
What just happened?
Power BI Desktop read the Excel and CSV files from your local raw folder, loaded them into the star schema model (6 dimensions, 3 fact tables), and computed all 22 DAX measures. The entire pipeline runs locally with no cloud connection required.
Refresh failed with errors?
The most common cause is an incorrect DataFolder path. Go back to Home > Transform data > Edit parameters and double-check that the path exists on your machine.
You can verify the path by pasting it into the File Explorer address bar. If the folder opens and shows data files, the path is correct.
help me troubleshoot a failed data refresh in my Power BI PBIP project
Your report is alive with data. Next up, you'll explore all three dashboard pages and interact with the visuals to understand what this banking analytics report reveals.
Explore the Three Report Pages
Your report is loaded with 36 months of synthetic banking data. The visuals are populated and ready to explore.
This report has three interactive pages covering transaction volumes, digital channel adoption, and branch-level performance. In this step, you'll explore each page and connect the live visuals back to the TMDL and PBIR code files you read earlier in Antigravity IDE.
In this step, get ready to:
- Explore the Overview page and interact with KPI cards and the Year slicer.
- Navigate the Channel Performance page to see digital adoption trends and channel breakdowns.
- Drill into the Branch Scorecard hierarchy to see branch-level metrics and NPS scores.
Explore the Overview page
The Overview page gives a high-level snapshot of the bank's transaction performance. The KPI cards and trend charts on this page are powered by the DAX measures you saw defined as plain text in the .tmdl files.
- In Power BI Desktop, click the Overview tab at the bottom of the report canvas.
- Identify the KPI cards across the top of the page: Total Transactions, Gross Transaction Value, NPS, and Digital Adoption %.
- Look at the monthly trend chart below the KPI cards to see how transaction volumes change over the 36-month period.
- Find the channel breakdown visual showing how transactions split across different banking channels.
- Click a value in the Year slicer to filter all visuals on the page to a single year.
- Click a different year value to see how the KPI numbers and trend charts update in response.
What is a slicer?
A slicer is an interactive filter control placed directly on the report canvas. When you click a value in the slicer, every visual on the page updates to show only data matching that selection.
Hold Ctrl while clicking to select multiple values at once.
You should see all four KPI cards displaying numeric values. The trend chart shows a line spanning 2023 through 2025, and filtering by year narrows the view to just that year's data.
Navigate the Channel Performance page
The Channel Performance page focuses on how customers interact with different banking channels over time. It shows digital adoption trends and compares channel efficiency.
- Click the Channel Performance tab at the bottom of the report canvas.
- Identify the digital-adoption KPI cards at the top of the page.
- Look at the 100% stacked column chart showing how the channel mix changes over time.
- Find the visual showing volume and average service time by channel.
- Examine the Channel x Transaction-Category matrix to see how transaction types distribute across channels.
What does the 100% stacked column show?
Each column represents a time period, and the colored segments show what percentage of total transactions went through each channel (branch, ATM, online, mobile). If digital adoption is rising, you'll see the online and mobile segments growing relative to branch over time.
You should see data populating all visuals on this page. The stacked column chart shows a clear trend across the 36-month period.
Drill into the Branch Scorecard page
The Branch Scorecard page lets you drill down from a high-level regional view all the way to individual branch performance. This hierarchy maps to the dimension tables you saw in the .tmdl files.
- Click the Branch Scorecard tab at the bottom of the report canvas.
- In the scorecard matrix, click a Region name to expand it and see the cities within that region.
- Click a City name to drill down further and see individual branches.
- Check the NPS scores displayed by branch.
- Find the detractor-reason breakdown visual showing why customers gave low scores.
How does the hierarchy connect to the code?
The Region > City > Branch drill-down is defined by relationships between dimension tables in the semantic model. Each dimension table you saw as a .tmdl file in Antigravity IDE describes the columns, hierarchies, and relationships that make this drill-down work.
The DAX measures (22 in total, across display folders like volume, revenue & targets, service/NPS, digital adoption, and time intelligence) calculate the numbers you see in the matrix cells. Every measure is readable text in the TMDL files.
You should be able to expand the hierarchy from Region down to individual branches. NPS scores and detractor reasons display at each level.
Why does this matter?
Everything you just interacted with in Power BI Desktop exists as plain text files in your Antigravity IDE explorer. The KPI cards are driven by DAX measures in .tmdl files. The page layouts and visual positions are .json files in the PBIR pages/ folder.
This means you can version-control report changes, review DAX edits in pull requests, and collaborate on analytics the same way software teams collaborate on code.
Seeing blank visuals or missing data?
If any page shows blank visuals, try clicking Home > Refresh on the ribbon again. The data refresh may not have completed for all tables.
If a slicer or hierarchy click does not filter the page, click an empty area of the canvas first to deselect any visual, then try the interaction again.
Help me troubleshoot blank visuals in my Power BI report.
Secret mission
Edit a DAX Measure in Code and See It Live
You have explored the PBIP report as a consumer. Now prove you can work as a developer. Open the TMDL files in Antigravity IDE, write a new DAX measure in plain text, and watch it appear live in Power BI Desktop.
Clean Up Your Resources
Clean Up Your Resources
This project runs entirely locally, so there are no ongoing costs. Decide whether to keep your resources running, pause them to come back later, or delete them entirely.
Resources you used:
- Power BI Desktop (installed from Microsoft Store).
- datapot-fabric-agent-demo cloned repository on local disk.
Keep everything running
No action needed. Choose this if you plan to keep exploring the report, experimenting with DAX measures, or using this project as a reference.
- Power BI Desktop stays installed and ready for future projects.
- The cloned repository remains on disk with your TMDL edits intact.
- Everything is local. No cloud costs accrue.
Pause - I'll come back to this later
Close Power BI Desktop to free up memory. Your project files and data stay on disk, ready to reopen anytime.
- Close Power BI Desktop if it is still open.
- The datapot-fabric-agent-demo folder and all its data remain on disk.
- To resume, double-click BranchChannelPerformance.pbip again and refresh the data.
Delete - I don't want to use this again
Remove all project resources and start fresh. Follow both steps below to fully clean up.
- Delete the cloned repository by opening a terminal and running:
rmdir /s /q C:\Users\%USERNAME%\Documents\datapot-fabric-agent-demo
- Uninstall Power BI Desktop from your machine:
- Press the Windows key and open Settings.
- Select Apps, then Installed apps (Windows 11) or Apps & features (Windows 10).
- Find Power BI Desktop in the list.
- Click the three-dot menu next to it and select Uninstall.
- Confirm when prompted.
Nice Work!
Nice Work!
You just cloned a professional-grade Power BI project from source control, configured it locally, and ran a fully interactive banking analytics report from code files.
You've learned how to:
- Clone a PBIP monorepo using Antigravity IDE and navigate its structure of TMDL semantic models, PBIR report definitions, and dataset contracts.
- Configure a parameterized data source in Power BI Desktop and refresh 36 months of synthetic banking data across a star-schema model with 6 dimensions and 3 fact tables.
- Explore a 3-page interactive dashboard (Overview, Channel Performance, Branch Scorecard) with 31 visuals and 22 DAX measures, using slicers and drill-down hierarchies to analyse performance data.
- Secret Mission: Modified a DAX measure directly in TMDL code and verified the change in Power BI Desktop, demonstrating the full "analytics as code" workflow.
Ready to quiz yourself?