Power BI Custom Visual

Treemap for Power BI

AI-generated treemap for Power BI. Describe what you need in plain English; download a ready-to-import .pbiviz file. Full TypeScript source included.

By · Founder & Reliability Engineer · Updated

Generate this Treemap

1–5 credits by complexity · 5 free on signup

A treemap divides a rectangle into nested sub-rectangles whose area is proportional to a numeric value. It's the fastest way to see composition at a glance when you have dozens or hundreds of categories — especially when categories are hierarchical (product → subcategory → SKU).

Power BI ships a basic treemap, but it's limited: no deep nesting beyond one or two levels, no drill-down preview on hover, no custom labeling logic for small cells, and no squarified vs. slice-and-dice layout choice. For executive dashboards or portfolio-analysis reports you usually end up layering conditional formatting onto a table instead.

VizForge generates a Power BI treemap tailored to how many levels of hierarchy you have, the labeling rules you want at small sizes, and the layout algorithm that fits your data best. Our AI writes the TypeScript visual against Power BI's hierarchy capabilities, packages it as a .pbiviz, and hands you the full source so you can tweak colors, borders, and interactions.

When to use a treemap in Power BI

  • Portfolio composition (asset class → sector → position)
  • Revenue by product hierarchy (line → family → SKU)
  • Cost structure breakdown (department → team → expense category)
  • Market share within a crowded category
  • Story viewership (channel → show → episode)

Example prompt

Example VizForge prompt

Treemap with 3 levels: product line → category → SKU. Size by revenue, color by profit margin (red below 15%, green above 30%, yellow between). Show labels only when cell is at least 5% of total area.

Data shape required

Hierarchy columns (e.g. Line, Category, SKU) plus a numeric Value column. Optional SecondValue column drives color scale independently of size.

Live preview

Live preview · sample dataDownload sample data (CSV) ↓
Compute$428KStorage$265KDatabases$198KNetworking$142KAnalytics$96KSecurity$74KSupport
Monthly cloud spend by product line — a treemap sizes each tile to its share of the bill. Rendered live from sample data — your generated visual uses your own model.

Typical DAX measures

Revenue = SUM( Orders[Amount] )

Margin Percent =
    DIVIDE( SUM( Orders[Profit] ), SUM( Orders[Amount] ) )

Label Visible (1 = show, 0 = hide) =
    VAR Share = DIVIDE( [Revenue], CALCULATE( [Revenue], ALL( Orders ) ) )
    RETURN IF( Share >= 0.05, 1, 0 )
Generate a Treemap — starts free

5 free credits on signup, no credit card required. One-time credit packs from $9.99 — credits never expire.

The example prompt on this page goes with you into the workspace.

FAQ

How many nesting levels does it support?

Up to 6 in practice. Beyond that, labels become unreadable. If you need deeper drill-down, generate a treemap that opens the deeper levels on click.

Squarified or slice-and-dice layout?

Squarified by default (more readable rectangles). Prompt for 'slice and dice' or 'strip layout' if you need a specific algorithm — VizForge supports them all.

Can color encode a different metric than size?

Yes. Prompt with something like 'size by revenue, color by margin percent' and the AI-generated visual decouples the two.

Will it drill through?

Yes — standard Power BI drill-through works via SelectionManager, and the visual supports 'expand next level' from the visual menu.

Guides for treemap

Dashboards that use a treemap

Dashboard jobs where a treemap is one of the recommended visuals, with the DAX and prompts for each.

Dashboard templates to put it on

Free page layouts from the Design Studio. Each downloads as a background image, theme JSON and PBIP project; drop the generated .pbiviz into the matching 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 →

Other ways to get a treemap

Honest, side-by-side comparisons with the marketplace and developer tools, including when they are the better choice.

Related 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.