Power BI How-To

How to make a network graph in Power BI

Build a network graph in Power BI: field wells, a worked example, when the native visual is enough, and how to generate the .pbiviz without code.

By · Founder & Reliability Engineer · Updated

A network graph draws entities as nodes and relationships as edges, with a force-directed layout that pulls connected nodes together so clusters become visible. Supplier networks, collaboration maps, co-purchase patterns and fraud rings all read better as a graph than as a table of pairs.

Power BI has no native network visual, and the graph needs two tables (nodes and edges) rather than one, which is where most attempts stall. This guide covers that model, the node-count ceiling where a force layout stops being useful, and the settings (repulsion, link distance, sizing) that turn a hairball into a diagram.

Step-by-step

  1. 1

    Shape the data for the network graph

    Two tables: Nodes (Id, Label, optional Size, optional Color) and Edges (Source, Target, optional Weight). In the finished visual those columns land in the Source, Target, Edge weight, Node size / Node colour wells, so name them that way from the start.

  2. 2

    Load a small sample into Power BI Desktop

    Import the five supplier edges as one table. Add a small table of companies with revenue only when you want node size, and spell every company exactly as it appears in Source and Target.

  3. 3

    Describe the network graph and generate the .pbiviz

    On VizForge, describe the chart in plain English and say what matters for this one: directed (arrowheads) or undirected edges; node size rule (fixed, by degree, by a measure) and node colour rule (by category or detected community); layout parameters to expose: repulsion, link distance, and whether to freeze the layout after settling. The pipeline writes the TypeScript, type-checks it and packages a .pbiviz.

  4. 4

    Import the .pbiviz into Power BI Desktop

    In the Visualizations pane, open the three-dot menu, choose Import a visual from a file and select the .pbiviz. The visual appears in the gallery; add it to the page like any built-in chart.

  5. 5

    Bind the field wells

    Source: Text column from the edge table: the node an edge starts at. Target: Text column from the edge table: the node an edge ends at. Edge weight: Optional numeric measure: edge thickness. Node size / Node colour: Optional measure and category from the Nodes table.

  6. 6

    Check the first render, then format

    Nodes with no edges floating alone: IDs in the edge table don't match the Nodes table (case or trailing spaces). A spinning, never-settling layout: too many nodes; raise the decay or enable 'freeze after N iterations'. Then open the formatting pane and set node radius range and label visibility threshold.

Field wells the generated network graph exposes

After import, these are the data roles you drop fields into. The names come from the visual’s capabilities.json, which you can rename before packaging if your team uses different terms.

WellTakesNote
SourceText column from the edge table: the node an edge starts at.Node IDs must match the Nodes table exactly, including case.
TargetText column from the edge table: the node an edge ends at.Self-edges (A → A) are dropped by default.
Edge weightOptional numeric measure: edge thickness.Also feeds the layout's attraction if you ask for it.
Node size / Node colourOptional measure and category from the Nodes table.Size by revenue or degree; colour by industry or community.

Worked example

Supplier relationships between five companies.

SourceTargetContract value
Acme MotorsBolt Co4.1M
Acme MotorsGlass Ltd2.3M
Bolt CoSteelworks1.8M
Glass LtdSteelworks0.9M
Zed PartsBolt Co0.4M

What the chart draws: Five nodes. Steelworks sits between Bolt Co and Glass Ltd because both buy from it; Zed Parts hangs off the edge with one thin link. Node size from revenue, edge thickness from contract value, hover highlights a node's neighbours.

Live preview

Live preview · sample dataDownload sample data (CSV) ↓
ChannelOutcomeSearch600Referral360Social440Converted620Nurturing420Churned360
Acquisition channels flowing to outcomes — a Sankey traces how volume splits and where each lead lands. Rendered live from sample data — your generated visual uses your own model.

The AI alternative: Describe your network graph in plain English and VizForge generates the .pbiviz, source included. 5 free credits on signup, no card required.

Generate a network graph on VizForge →

Without code: what to put in the prompt

The generator turns a description into the TypeScript, so the description is where the decisions live. For a network graph, say:

  • Directed (arrowheads) or undirected edges.
  • Node size rule (fixed, by degree, by a measure) and node colour rule (by category or detected community).
  • Layout parameters to expose: repulsion, link distance, and whether to freeze the layout after settling.
  • Interactions: zoom and pan, drag nodes, highlight neighbours on hover, click to cross-filter.
  • What happens above a node limit: cluster, sample, or show a warning.

Example VizForge prompt

Network graph with force-directed layout. Nodes are companies, edges are supplier relationships weighted by contract value. Size nodes by revenue, color by industry cluster. Allow zoom and pan. Highlight neighbors on hover.

Customise it: formatting options worth exposing

Anything you name as adjustable becomes a card in Power BI’s formatting pane, which a report theme can then set for every copy of the visual. For a network graph the options that earn their place are:

  • Node radius range and label visibility threshold.
  • Edge width range, opacity and arrowhead size.
  • Layout forces (charge strength, link distance, gravity) and a 'freeze layout' toggle.
  • Colour palette per category or community.
  • Label font and whether labels are always on or hover-only.

For changes the pane doesn’t cover, edit settings.ts and visual.ts in the source that ships with the download and repackage; or refine on VizForge and get a v2 that keeps everything you didn’t mention.

When native Power BI is enough (as of November 2026)

Power BI has no native network graph. A matrix of source by target with conditional formatting is enough when there are only a dozen nodes and the question is 'who is connected to whom'. The Decomposition tree works for one-directional hierarchies. A network graph is for many-to-many relationships where the clusters and the bridges between them are the finding.

Limits of Marketplace network graph visuals

Marketplace network visuals generally expose few or no layout parameters, so a dense graph stays a hairball, and node and edge limits are low on free tiers because force layouts are expensive. Community detection, neighbour highlighting and directed edges are commonly paid. With fixed wells you cannot bind both a size and a colour measure to nodes from your own tables the way your model is shaped.

The general trade-offs (per-user licensing, closed source, no new field wells) are the same for every chart type; see VizForge vs Microsoft Marketplace visuals for the full comparison.

Download, install and first render

The download is a standard .pbiviz plus the TypeScript source. Import it in Power BI Desktop (Visualizations pane → three dots → Import a visual from a file), add it to the page and bind the wells above. Then check the network graph against this list before you connect the full dataset:

  • Nodes with no edges floating alone: IDs in the edge table don't match the Nodes table (case or trailing spaces).
  • A spinning, never-settling layout: too many nodes; raise the decay or enable 'freeze after N iterations'.
  • All nodes the same size: the Node size measure isn't bound, or the Nodes table isn't related to the edge table.
  • Clicking a node filters nothing: cross-filter is on the edge table; check the relationship direction.

When to use a network graph

  • Supply-chain relationships (suppliers ↔ plants ↔ warehouses)
  • Organizational network (who collaborates with whom)
  • Customer co-purchase networks
  • Fraud detection (suspicious linkages between accounts)
  • Knowledge graph visualization

Frequently asked questions

Will the visual work in Power BI Service, Premium and embedded reports?

Yes. A .pbiviz is a standard Power BI custom visual and renders the same in Desktop, the Service, Premium and Premium per User capacities, and embedded scenarios. Tenant admins can restrict custom visuals to certified or organisational ones; if yours does, publish the .pbiviz as an organisational visual rather than importing it per report.

What if I need to change the visual later?

Two paths. Refine on VizForge with an instruction such as "add a target line" and get a v2 .pbiviz that keeps everything you didn't mention; or open the TypeScript source that ships with every download in VS Code, edit it and repackage with pbiviz package.

How many nodes can it handle?

Force-directed layout stays smooth up to ~500 nodes. Beyond that prompt for 'clustered hierarchical layout' which groups before drawing.

Can I pre-cluster the nodes by community?

Yes — bring a Community column and color by it, or let the visual run Louvain community detection client-side.

Directed or undirected?

Both. Prompt for 'directed with arrowheads' or 'undirected'. Directed graphs can optionally show bidirectional edges with curved lines.

Does it cross-filter?

Yes — click a node to filter other visuals; click the background to reset. Edges can be clickable too if you specify.

Put your network graph on a designed page

Free Design Studio page layouts. Download the background, theme and PBIP project, then import the visual into the slot.

Design the page around it, free

A custom visual looks best on a designed page. The free VizForge Design Studio lays out a branded report page at Power BI’s pixel size and exports the background image, a theme JSON and a PBIP project. No signup.

Open the free Design Studio →

Guides for related charts

VizForge — AI-generated Power BI custom visuals.

Make the report.
Then make it yours.

The Design Studio, templates and tools are free with no account (exports carry a small VizForge mark until you sign in). Sign up when you want AI: 5 credits on us, no card.

Generated visuals are type-checked and built before you download them; one that fails the quality SLA refunds its credits. See all features or pricing.