Power BI Core Visualizations: Pie, Donut, and Treemap

Chart your data journey! Transform data into insights with Power BI core visualizations.

1. Introduction to Core Visuals

  • Pie charts : show data as slices of a circle, representing the contribution of each category to a whole.
  • Donut charts : similar to pie charts but with a blank center that can be used for labels or icons.
  • Treemap charts : use nested rectangles to visualize hierarchical data levels.
  • Best practice: choose the right chart depending on the purpose and data size.

2. Customizing Pie Charts

Adjusting Colors :
  • Use the Slices property in the Format pane.
  • Keep category colors distinct and consistent across visuals.
A pie chart displaying total sales by region, with segments representing Asia, Europe, and the United States, along with their respective sales amounts and percentages. The chart is accompanied by a color customization panel for slices.
Formatting Data Labels :
  • Options include position (inside/outside), displaying category name, value, or percent of total.
  • Avoid clutter; adjust font size, background, and color for clarity.
Screenshot of Power BI detail labels options, showing settings for label position and content, including inside, outside, and preferences for displaying categories and values.
Using Legends :
  • Add legends to show category color mapping.
  • Combine legends with concise data labels for total + % values.
A pie chart displaying total sales by region, with segments representing Asia, Europe, and the United States. The Asia segment shows $233.1K (42%), while both Europe and the United States each show $147.3K (27%).
Best Practice:
  • Use pie charts for a small number of categories (ideally ≤ 5).

3. Customizing Donut Charts

Color & Labels :
  • Same as Pie charts.
Inner Radius :
  • Adjust spacing to control the width of the ring.
  • Larger inner radius = more “donut-like,” draws focus to the center.
A donut chart displaying total sales by region, with segments representing Asia, Europe, and the United States, accompanied by their corresponding dollar amounts and percentages.
Center Space Usage :
  • Add KPI text, totals, or labels in the center.
Donut chart displaying total sales by region, showing contributions from Asia, Europe, and the United States, with corresponding values and percentages.
Best Practice :
  • Use only when you have few, simple categories.

4. Customizing Treemap Charts

Colors :
  • Assign consistent category colors across visuals.
Treemap chart displaying total sales data categorized by product and product code, with color coding for different product types like TV, Laptop, Tablet, Headphones, and Smartphone.
Labels :
  • Turn on Data Labels and adjust size, color, display units, decimals.
  • Increase font weight for parent categories.
Treemap chart displaying total sales data by product and product code, categorized into sections for TV, Laptop, Tablet, Smartphone, and Headphones, with corresponding sales figures.
Tooltips :
  • Show detailed info (e.g., product code, sales %) when hovering.
A treemap chart displaying total sales data categorized by product and product code, with highlighted sections for TVs, laptops, tablets, headphones, and smartphones, along with a tooltip showing details for a selected TV product.
Drill-Down Feature :
  • Navigate hierarchy levels interactively (e.g., Product >> Region).
Treemap chart displaying total sales data categorized by product, region, and product code, with sections for Asia, Europe, and the United States.
Best Practice :
  • Works best when category size differences are significant.

5. Advanced Techniques

Current Year Sales by Product (Donut) :
  • Measures: Total Sales CY and Remaining CY Sales.
Total Sales CY =
TOTALYTD ( [Total Sales], DateTable[Date] )
Remaining CY Sales =
VAR _allSales =
    CALCULATE ( [Total Sales CY], ALL ( Sales ) )
RETURN
    _allSales - [Total Sales CY]
  • Center label shows selected product and sales.
Selected Product =
IF (
    ISFILTERED ( Products[Product] ),
    IF (
        HASONEVALUE ( Products[Product] ),
        VALUES ( Products[Product] ),
        CONCATENATEX ( ALLSELECTED ( Products[Product] ), Products[Product], ", " ) & " Sales"
    ),
    "All Products"
)
  • Subtitle measure compares performance vs. last year and target.
Product Sales Subtitle =
VAR _lyYTDSales =
    TOTALYTD (
        [Total Sales],
        DATESBETWEEN (
            DateTable[Date],
            DATE ( MAX ( DateTable[Year] ) - 1, 1, 1 ),
            DATE ( YEAR ( TODAY () ) - 1, MONTH ( TODAY () ), DAY ( TODAY () ) )
        )
    )
VAR _compare = [Total Sales CY] - _lyYTDSales
VAR _percentDiff = _compare / ( ( _lyYTDSales + [Total Sales CY] ) / 2 )
RETURN
    FORMAT ( [CY Sales Percent of Target], "0.0%" ) & " of Sales Target | "
        & IF ( _compare < 0, "▼", "▲" )
        & FORMAT ( ABS ( _percentDiff ), "0.0%" ) & " compared to previous"
Donut chart displaying current year laptop sales, showing 20% of the sales target achieved, totaling $23.2K, with performance compared to previous year.
Current Year Sales by Region (Donut) :
  • Create region-wise CY measures (Asia, Europe, US).
Asia Sales CY =
CALCULATE ( [Total Sales CY], Regions[Region] = "Asia" )
Europe Sales CY =
CALCULATE ( [Total Sales CY], Regions[Region] = "Europe" )
US Sales CY =
CALCULATE ( [Total Sales CY], Regions[Region] = "United States" )
  • Add “diff” measures to highlight differences.
Asia Sales CY Diff =
[Total Sales CY] - [Asia Sales CY]
Europe Sales CY Diff =
[Total Sales CY] - [Europe Sales CY]
US Sales CY Diff =
[Total Sales CY] - [US Sales CY]
  • Format as concentric donuts for regional comparison.
  • Add custom legend showing both sales values and % contributions.
Asia CY % Sales =
DIVIDE ( [Asia Sales CY], [Total Sales CY] )
Europe CY % Sales =
DIVIDE ( [Europe Sales CY], [Total Sales CY] )
US CY % Sales =
DIVIDE ( [US Sales CY], [Total Sales CY] )
A donut chart displaying current year regional sales, with segments representing Asia, Europe, and the United States. Each segment includes corresponding sales figures and percentage contributions.

6. Key Best Practices

Pie & Donut Charts :
  • Use for small datasets with few categories.
  • Avoid overcrowding labels.
  • Keep visuals simple and color-consistent.
Treemap Charts :
  • Best for hierarchical data.
  • Effective when category sizes are clearly different.
  • Use tooltips to supplement small rectangles.
Overall :
  • Always prioritize clarity and simplicity.
  • Match chart type to your data story.

 Conclusion:

Pie, Donut, and Treemap charts are powerful when used in the right context. Keep them clean, simple, and consistent for maximum impact in your Power BI reports.

Similar Posts