Skip to content

Review formula changes between two workbooks.

Compare saved calculation definitions before asking an agent to review a workbook change. Choose one .twbx at a time: a before workbook, then an after workbook.

Updated

Read locally in this browser.

↳after.twbxSynthetic sample

Which revenue definition changed?

The synthetic before workbook sums Revenue. The after workbook applies a 10% adjustment. This is a definition diff, not proof of the resulting business metric.

“Compare Net Revenue before and after this workbook edit.”

Worked example · authored synthetic data

  1. Read the original fileUse the existing browser reader
  2. Check the definitionKeep the grouping and filter scope explicit
  3. Compute the resultUse the existing xmetric engine
  4. Review the evidenceRead the exact cells and query

Calculation or query in this example

Before: SUM([Revenue])
After: SUM([Revenue]) * 0.9

Exact sample file · Definitions and expected values

xmetricBefore / after formulas

Opening the labelled sample…

The browser is reading the sample’s workbook definitions.

Use your own file

Drop one file anywhere on this page. It is read in your browser; no file is uploaded.

Nothing is uploaded.

Read locallyThe original file stays in the browser.

Share deliberatelyMCP shares supported metadata and requested results with the chat host.

Separate actionsOnline saves and support uploads require their own actions.

How does this workflow work?

What is the direct answer to this workbook question?

Running git diff on two Tableau .twb or .twbx files produces thousands of noisy XML lines from window coordinates and cache tags. To review real changes with an AI agent, extract only data source columns, calculated field formulas, and shelf encodings, or drop both workbooks into the xmetric inspector to compare their structure.

Why is a raw git diff difficult to read for .twb and .twbx?

Two problems make reviewing workbook changes in pull requests painful:

  1. .twbx is a compressed ZIP archive: Git treats .twbx as a binary blob (Binary files a/sales.twbx and b/sales.twbx differ).
  2. .twb XML changes every time you click Save: Even if an analyst only changes a single filter from >= 2025 to >= 2026, saving the workbook in Tableau Desktop rewrites thumbnail caches, window pixel dimensions, active tab focus, and metadata object IDs across thousands of lines.

When you feed that 15,000-line raw XML diff to an AI coding agent, it burns tokens on UI noise and can miss a silent change inside a { FIXED } Level of Detail calculation.

How can a Python script compare workbook definitions?

Before asking Claude Code, Cursor, or a CI review bot to review a workbook update, normalize both .twb or .twbx files into a clean JSON summary containing only semantic logic (data sources, calculated fields, and worksheet shelves):

import json, zipfile, sys
import xml.etree.ElementTree as ET

def extract_workbook_spec(path):
    if path.endswith(".twbx"):
        with zipfile.ZipFile(path) as zf:
            twb_name = [n for n in zf.namelist() if n.endswith(".twb")][0]
            root = ET.fromstring(zf.read(twb_name))
    else:
        root = ET.parse(path).getroot()

    calcs = {}
    name_map = {}
    for col in root.findall(".//datasource/column"):
        raw_name = col.attrib.get("name", "")
        caption = col.attrib.get("caption", raw_name)
        name_map[raw_name] = caption
        calc = col.find("calculation")
        if calc is not None and "formula" in calc.attrib:
            calcs[caption] = calc.attrib["formula"]

    sheets = {}
    for ws in root.findall(".//worksheets/worksheet"):
        ws_name = ws.attrib.get("name")
        rows = [t.text for t in ws.findall(".//table/rows") if t.text]
        cols = [t.text for t in ws.findall(".//table/cols") if t.text]
        sheets[ws_name] = {"rows": rows, "cols": cols}

    return {"calculations": calcs, "worksheets": sheets}

if __name__ == "__main__":
    print(json.dumps(extract_workbook_spec(sys.argv[1]), indent=2, sort_keys=True))

Now run a clean diff between the old and new versions:

diff -u <(python3 spec_extract.py main_report.twbx) <(python3 spec_extract.py pr_report.twbx)

Which semantic changes should I check in a workbook review?

Once the XML noise is stripped, ask your agent to audit these four risk areas:

  • Modified calculated field formulas: Did a denominator change from COUNTD([Customer ID]) to COUNT([Customer ID]), or did a FIXED LOD gain or lose a partitioning dimension?
  • Changed filter types on worksheets: Did a dimension filter get added to or removed from Context (context='true'), which silently changes every FIXED LOD result on that sheet?
  • Swapped pills on Rows, Columns, or Marks: Did a measure aggregation change from SUM to AVG, or did a table calculation's addressing fields shift?
  • Data source join or Custom SQL edits: Were join keys altered or INNER JOIN clauses switched to LEFT JOIN?

How can I inspect the before and after workbooks?

A formula diff tells you what changed in the calculation syntax. To see the dependency structure of both files, drop before.twbx and after.twbx into the xmetric workbook inspector together; it accepts several files at once to compare them:

  • No desktop install needed. Reviewers can inspect both workbooks' data sources, sheets, dashboards, dependencies, fields nothing uses, and calculations that refer to a missing field, free in the browser, without installing Tableau Desktop (which offers a free local edition for one person without publishing or sharing, free Tableau Reader, or Tableau Creator at $75 per user/month, billed annually as of October 2026).
  • Everything stays local. Save the data files packaged inside a .twbx, copy the inspection as JSON for diffing, or test modified formulas in the formula playground without uploading company data. To see the changed sheets as charts, open the new version in the xmetric app.
  • Agent-ready architecture. The public xmetric MCP server is live at https://getxmetric.com/mcp with no authentication or API key. Anonymous initialize, tool discovery and widget-resource checks passed on 2026-10-29. ChatGPT and Claude host rendering and tool selection remain unverified; their directory listings remain coming. Workbook diffs remain a browser-inspector or script workflow; the public MCP catalog does not provide a workbook-diff tool.

What is live, and what remains planned?

The public xmetric MCP server is live at https://getxmetric.com/mcp with no authentication or API key. Anonymous initialize, tool discovery and widget-resource checks passed on 2026-10-29. ChatGPT and Claude host rendering and tool selection remain unverified; their directory listings remain coming. See the dated public protocol receipt and setup and evidence limits.

The public server is available; host operation and directory approval are separate checks.

CapabilityCurrent status
Public remote HTTPS MCP serverLive; anonymous initialize, tools and widget assets checked
ChatGPT and Claude host rendering and tool selectionUnverified
ChatGPT and Claude directory listingsComing
Live Postgres and BigQuery connections in xmetricComing

The file board parses supported .pbix, .twbx/.twb, CSV, Excel and Parquet files in your browser. Choosing a file shares supported schema, source names and calculation definitions with xmetric and the chat host; requested result cells, filters and SQL or DAX evidence are shared when answering. The original file is not uploaded by this flow. Small aggregates and labels can still be sensitive. Privacy details.

Can I teach Git to automatically diff .twbx files using `.gitattributes`?

Yes. Add *.twbx diff=twbx to .gitattributes and configure git config diff.twbx.textconv "python3 spec_extract.py" in your repository. Every git diff and git log -p will then show only formula and worksheet changes instead of Binary files differ.

Does xmetric modify my .twbx file when I open it to review a colleague's changes?

No. Inspecting a .twbx, .twb, .pbix, or .pbip file in xmetric reads the workbook in your browser's memory without altering your file on disk.

How can I check if a workbook diff introduced broken or unused calculated fields?

Drop the updated .twbx into the xmetric workbook inspector. It flags calculations that refer to a missing field, shows fields nothing uses, and traces which sheets use each formula.

Drop both versions into the workbook inspector before you approve the pull request.

What data does this worked example use?

The initial view uses authored synthetic data, not customer data or a captured agent session.

The example record lists its file, calculation or SQL and expected values. The live browser result is computed by xmetric’s existing engine or workbook inspector. Samples are excluded from own-data activation reporting.