How to Review Power BI Changes in a Pull Request with PBIP and Git

Review every Power BI change before it ships: branch, save, review, merge

This post was first published on the Microsoft Fabric Community Blog. This version adds a few notes for ExcelFort readers.

Your .pbip project is in Git. Every save lands as a commit, and you can roll back if something breaks. But who checks the change before it reaches main? For most Power BI teams the honest answer is nobody, and a broken measure is found by a business user three weeks later.

There’s no magic here: a pull request (PR) for Power BI works the same way it does for application code. A Power BI project is just text files, so a reviewer can read a measure change line by line before it ships. The hard part is knowing what to look at and what to ignore.

This post is Part 2 of my PBIP series. Part 1 covered editing a project in three tools without losing work. Here I walk through one real change, from branch to merged PR, on a public demo repo you can open yourself. It’s for Power BI developers who already save as .pbip and want a review step that actually catches problems.

Key takeaways

  • Nothing reaches main without a PR. A one-line branch protection rule turns review from a good intention into a habit.
  • Model diffs are easy, report diffs are noisy. TMDL reads like code; PBIR is JSON, one file per visual, and needs more care.
  • Not every changed line is a change. Desktop writes housekeeping edits on save. Learn to spot them and leave them out.
  • A diff can’t show you a chart. The reviewer still opens the report before approving.

Why Review Power BI Changes at All

A Power BI change is rarely just the thing you meant to change. Save once in Desktop and Git may show a measure edit, a reformatted expression, a schema version bump and the page you happened to have open. Without a review, all of it goes straight into the shared project.

In my day job I approve every Business Central code change through a pull request before our pipeline deploys it. Nobody would push AL code straight to production. Yet the semantic model that finance reads every morning often gets less scrutiny than a typo fix in an extension. PBIP closes that gap, because the model is now text that can be reviewed in exactly the same way.

The rule for this post is simple: branch, save, review, merge.

Workflow diagram: branch, edit and save, commit, pull request, merge
Diagram: feature branch → commit in VS Code → pull request → review → merge to main

Set Up the Repo Once

I tested everything on a copy of the Supply Chain Sample report, saved as a Power BI project with TMDL for the model and PBIR for the report. PBIR is now generally available and is the default report format, so new projects already use it. The repo is public: FowmyM/pbip-pull-request-demo.

Three one-time settings make the rest of the workflow reliable:

  • A .gitignore for local files. Exclude **/.pbi/localSettings.json and **/.pbi/cache.abf. The cache is a binary copy of your data: it bloats the repo and can’t be reviewed anyway.
  • One line-ending setting for everyone. Desktop writes Windows line endings (CRLF). My repo stores them as-is with core.autocrlf=false. Pick one setting for the whole team, or a teammate on a different machine will produce diffs where every line looks changed.
  • A branch protection rule on main. In GitHub go to Settings → Branches → Add rule, enter main and tick “Require a pull request before merging”.

For a team, also tick “Require approvals”. I left it off on this solo demo repo because GitHub won’t let you approve your own pull request.

Make the Change on a Branch

The worked example is a realistic one. The Backorder Percentage table had four measures in no folder, no descriptions, and one real bug: % on time orders used exactly the same DAX as % on backorder, so both cards showed the same number.

  1. Create a branch: git switch -c feature/backorder-kpi-fixes (or Source Control → ⋯ → Branch → Create Branch in VS Code).
  2. Make the changes in Power BI Desktop, or in the TMDL files directly. I fixed the measure, added descriptions, moved all four measures into a Backorder KPIs display folder, and gave one column chart a title.
  3. Save in Desktop (Ctrl + S) and close it.
  4. In VS Code, stage only the files you meant to change and commit. I made two commits, one for the model and one for the report, so the reviewer can read them separately.
  5. Push the branch and open a pull request in GitHub.

A good PR description saves the reviewer time. Mine lists what changed in the model, what changed in the report, what I left out on purpose, and a short checklist. You can read the actual PR.

Reading the Model Diff

This is where PBIP pays for itself. TMDL is plain text with one property per line, so the model diff reads almost like a code review.

GitHub split diff of the Backorder Percentage TMDL file in pull request 1
GitHub split diff of Backorder Percentage.tmdl showing the % on time orders fix, the Backorder $ refactor and the new displayFolder lines

In one screen the reviewer can see four things:

  • The bug fix. measure '% on time orders' = AVERAGE(...) became 1 - [% on backorder], and gained a percentage formatString.
  • A refactor with the same result. Backorder $ now uses VAR AvgOrderValue = 10000 instead of a hard-coded number. The reviewer’s job is to confirm the result didn’t change.
  • Descriptions. The /// lines above each measure are TMDL descriptions. They show up as tooltips in the Data pane, so they’re worth reviewing for wording too.
  • Display folders. Each displayFolder: Backorder KPIs line is a one-line, low-risk change.

What should make a reviewer slow down? Changes to relationship blocks, role definitions (RLS), partition sources and anything under expressions. These change what data people see, not just how it’s labelled.

Reading the Report Diff

Report changes are where reviews get harder. In PBIR every visual is its own visual.json file, which is much better than the old single report.json. But a visual’s JSON is long and nested, so a small change can look big.

GitHub split diff of a PBIR visual.json file showing a schema bump and a new title block
GitHub split diff of visual.json: the $schema line moving from 2.14.0 to 2.15.0, and a new visualContainerObjects title block

My one report change, a chart title, produced two hunks:

  1. The title I set. A new visualContainerObjects → title block with the text “Backorder trend by month”. Fifteen lines of JSON for one property.
  2. A change I didn’t make. The $schema reference moved from 2.14.0 to 2.15.0. Desktop upgraded it when it saved the visual.

That second hunk is the most important lesson in this post.

Which Changes Are Just Noise

Here’s what one save in Power BI Desktop (version 2.160.1151.0, November 2026) wrote that I never asked for:

  • activePageName in pages.json. Desktop records which page you last had open. Two developers looking at different pages will “change” this file every time.
  • Schema version bumps. The $schema URL in a visual moved up a version when Desktop saved it. Harmless, but it shows up in the diff.
  • Reformatted DAX. I wrote the multi-line Backorder $ measure with TMDL’s triple-backtick block. Desktop rewrote it without the backticks on save. Same DAX, different text.
VS Code side-by-side diff of pages.json where only activePageName changed
VS Code side-by-side diff of pages.json where only activePageName changed

My test for every changed file: did the meaning change, or just the text? If only the text changed, decide on purpose. I discarded the activePageName change before committing (Discard Changes in VS Code, or git restore <file>). I kept the schema bump, because it’s tied to the visual I did change, and said so in the PR description.

The Reviewer Checklist

This is the checklist I put in every Power BI PR description:

  1. DAX changes do what the description says. Check the logic, not just the syntax.
  2. No unexpected relationship, cardinality or cross-filter changes.
  3. No changes to RLS roles or data sources unless the PR is about them.
  4. New or changed measures have a format string, a description and a display folder.
  5. No cache.abf, localSettings.json or other local files in the diff.
  6. Noise is either discarded or called out in the description.
  7. The report was opened in Desktop and checked visually.

That last point matters. A diff tells you a title changed. It can’t tell you the title now overlaps the legend.

Power BI Desktop Data pane with the Backorder KPIs display folder and a measure description tooltip
Power BI Desktop Data pane showing the Backorder KPIs folder with the % on time orders description tooltip

Know the Limits

WARNING: Watch your path length. Windows limits a full file path to 260 characters, and Power BI Desktop enforces it. My project lived in a deep OneDrive folder, and a custom visual’s folder name alone adds about 120 characters. Desktop refused to open the project (“The specified path, file name, or both are too long”). Renaming the project folder fixed it. Keep PBIP repos at a short path such as D:\Repos\<project>.

  • A PR doesn’t render the report. Reviewers still need to check out the branch and open it in Desktop for anything visual.
  • Merge conflicts in report JSON are painful. Two people editing the same visual will collide. Split report work by page, and keep model and report changes in separate commits.
  • Approvals need a second person. On GitHub you can’t approve your own PR. Solo developers can still require a PR; they just merge without approval.
  • Tested on Power BI Desktop 2.160.1151.0 (November 2026), GitHub, and VS Code with Git for Windows. Behaviour may differ in other versions, and in Azure DevOps the menu names differ.

Tabular Editor users: the same workflow applies. Tabular Editor 2 and 3 both save TMDL to the same folder, so the model diff looks the same. Just save from one tool at a time, as covered in Part 1.

In Conclusion

A pull request turns your Power BI project from “saved” into “reviewed”. Protect main, read the TMDL diff carefully, treat report JSON with suspicion, and throw away the noise before it reaches the shared project. Branch, save, review, merge.

In the next post I’ll take this same repo and connect it to a Fabric workspace with Git integration, so a merged PR becomes a deployed report.

Over to you: do your Power BI changes go through a pull request today? If they do, what’s on your reviewer checklist that isn’t on mine?

Setting up Git and pull request reviews for your Power BI team? ExcelFort helps organisations with Power BI consulting and implementation and hands-on Power BI training. Get in touch.

Related Posts

References

Spread the word

Leave a Comment

Scroll to Top