Compare versions

trailsbi diff compares two versions of a project and says what changed, what breaks, what may show different numbers, and what was already broken.

Run TrailsBI on the project, change the report or the model, then run:

  • trailsbi diff "D:\Reports\Sales"

It compares the project with its last saved run that differs, prints the report, and writes it as a page that you can read, send or attach to a ticket. A rename is a rename, not a delete and an add, and reformatted DAX is no change.

What to compare

Old first, then new. Each is a folder or a saved run.

  • trailsbi diff "D:\Reports\Sales"

    the project, with its last saved run that differs

  • trailsbi diff

    the same, for the project in this folder

  • trailsbi diff run:release-12 "D:\Reports\Sales"

    a saved run, with the project (run:12 and run:last work too)

  • trailsbi diff "D:\Production" "D:\Test"

    two folders

  • trailsbi diff run:3 run:5 --project "D:\Reports\Sales"

Pages, Markdown and JSON

  • trailsbi diff Sales

    an HTML page, to read or send

  • trailsbi diff Sales --md

    Markdown, for a pull request or a ticket

  • trailsbi diff Sales --json

    JSON, for other tools

  • trailsbi diff Sales --md --json -o impact

    impact.md and impact.json

  • trailsbi diff Sales -o impact.md

    the extension says the format

Without -o, or with a folder, the file is called TrailsBI Diff - Sales - 2026-12-01 10-30.html. When there is one of that minute, the new one gets a number, (2). With -o FILE it replaces an earlier report of diff, and no other file. --open opens it. diff saves no run and changes none of the project's files. The page is written in the folder you're in, so when that's the project's, it's there, next to its files: -o puts it somewhere else. When nothing changed since the last run, it says so and writes no file.

The page is one file. It has no script and loads nothing. Its one link is to the design partner page of trailsbi.com, which is opened only if you click it. Under an effect, Visuals opens the list of the visuals that may change, up to 200. Other lists end after 1,000 lines. The terminal and Markdown are shorter, and the JSON has everything.

Saved runs

A saved run whose hash doesn't match was changed after it was saved. diff says so and doesn't use it.

A run of part of a folder (--model, --report, --workspace, --filter) is compared with the same part of the project.

What counts as a change

Change Meaning
Removed, added It's only on one side. What's inside it is counted, not listed
Renamed The same object, with another name
Moved The same object, in another table
Rewritten Its DAX, Power Query or filter changed
Recreated Deleted and made again under the same name
Changed Anything else: a property, a visual's fields, a filter, formatting, position

Objects are paired by the identifier Power BI keeps, else by name. Two folders with one model and one report each are always compared with each other, whatever they're called. A measure, column, calculation item or role without one is probably renamed when exactly one new object is made of the same code.

These are no change: comments, spacing and letter case in code; following a rename, in code or in a report; line endings and the order of keys in a file; annotations, change marks and other bookkeeping Power BI writes by itself; filters without a condition; automatic date tables that Power BI made again.

For a filter or slicer, the report shows the values that were picked before and after. Another selection in a slicer can change the numbers of every visual on its page.

When several models or reports were read, each change says which one it's in. When the two sides are of different selections, Health findings and readiness aren't compared.

Code whose text is the same, but in which a name now means something else, is a change, and says so.

What breaks

A reference is broken by this change when it doesn't resolve in the new version and did in the old one. It's already broken when it didn't resolve in the old one either. What uses something broken is broken too.

Checked are: fields in visuals, filters and pages; DAX and the functions it calls; Power Query's references to other queries, parameters and tables; relationships, hierarchies and sort columns; every other property that names a table, column or hierarchy; buttons and tooltips that open a page or bookmark; automatic date hierarchies, in visuals and as Sales[Day].[Year]; and the semantic model a report's definition.pbir points at.

Each break has a cause: the change that removed, renamed or moved what it points at.

What it may do

Effect When
Breaks It's the cause of a break
Security Row-level security changed, or what a role's filter depends on, such as a relationship it goes through
Numbers Visuals may show different numbers
Display Visuals may look different: formats, titles, positions, the names they show fields by
Other Bookmarks, settings, Prep data for AI, images, mobile layouts, the diagram's layout, other files
None Nothing that was read uses it, or it's something no visual shows: a description, a display folder, whether a measure, column or table is hidden, a role's name

What it can't tell

  • Whether numbers are right. TrailsBI reads the files and doesn't run the report.
  • Reports and models outside what was read, Excel files and paginated reports.
  • What bookmarks and mobile layouts use. That they changed is noticed.
  • What models that read another semantic model show.

When a file can't be read, or a whole model or report can't, the report starts with Incomplete and names it. What's in it isn't taken for removed, and Health findings aren't compared. A TMDL file with an unsolved merge conflict is read as it stands, so the report can be wrong: trailsbi scan lists those.

For other tools

--json writes everything that the page shows, and more: see the diff's JSON.