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.

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.

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

Free plan: 3 visuals per month. No credit card required.

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.

How-to guides for treemap

Related visuals

Your next visual
ships in 4–10 min.

Sign up free. 5 credits to generate your first visuals on us. No credit card required.