Skip to content
BI Data

Model Relationship SVG — Power BI Diagram

About this tool

Visualize table relationships from a Power BI model as an interactive SVG diagram. Inspect the supplied relationship structure and export a diagram for documentation.

Features

Uses D3.js for an interactive SVG diagram with draggable nodes.

Features

  • Load JSON describing table relationships
  • Interactive SVG diagram with D3.js
  • Drag table nodes
  • Automatic force-directed layout
  • Relationship direction arrows
  • Tooltips with relationship details

Input format

  • File: relationships.json
  • Structure: array of relationship objects
  • Fields: FromTable, FromColumn, ToTable, ToColumn
  • Encoding: UTF-8
JSON file containing an array of table relationship objects

Model relationship diagram

Usage reference

JSON file format

[
  {
    "FromTable": "Sales",
    "FromColumn": "ProductID",
    "ToTable": "Product",
    "ToColumn": "ID"
  },
  {
    "FromTable": "Sales",
    "FromColumn": "CustomerID", 
    "ToTable": "Customer",
    "ToColumn": "ID"
  }
]

Exporting from Power BI

  1. Open Power BI Desktop
  2. Open Model view
  3. Use DAX Studio or Tabular Editor to inspect metadata
  4. Prepare relationship JSON in the format shown above
  5. Load the file into this tool

Diagram controls

  • Dragging: Click and drag tables
  • Tooltips: Hover over a relationship for details
  • Automatic layout: Force simulation arranges nodes
  • Sizing: Adaptive node sizes
  • Export: Save the diagram as SVG

Other metadata sources

  • SQL Server: sys.foreign_keys views
  • Azure Analysis Services: TMSL scripts
  • Power BI Service: Metadata REST API
  • DAX Studio: model metadata exported to JSON

More tools

Free tools for analysts and developers