Power BI How-To
How to make a box plot in Power BI
Build a box plot in Power BI: field wells, a worked example, when the native visual is enough, and how to generate the .pbiviz without code.
By Nawaf Sharaf · Founder & Reliability Engineer · Updated
A box plot summarises a distribution in five numbers (minimum, Q1, median, Q3, maximum) with dots for outliers, one box per group. It is the quickest honest comparison of groups: ticket resolution time by priority, order value by region, lab results by batch.
Power BI has no native box plot. This guide builds one from raw observations, explains the whisker rule choice (Tukey 1.5× IQR versus min/max) that changes what counts as an outlier, and covers the small-sample behaviour that keeps a box from lying when a group has four rows.
Step-by-step
- 1
Shape the data for the box plot
Two columns: Group (text) and Value (numeric). Each row is one observation. In the finished visual those columns land in the Group, Value, Colour wells, so name them that way from the start.
- 2
Load a small sample into Power BI Desktop
Import the raw ticket rows (Priority, resolution hours), not the quartile table in the worked example, which is what the visual computes from them. Include a few very slow P1 tickets so you can check the outlier dots.
- 3
Describe the box plot and generate the .pbiviz
On VizForge, describe the chart in plain English and say what matters for this one: whisker rule: Tukey 1.5× IQR with outlier dots, or min/max with no outliers; horizontal or vertical boxes; notched boxes for median confidence intervals, on or off. The pipeline writes the TypeScript, type-checks it and packages a .pbiviz.
- 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
Bind the field wells
Group: Text column: one box per value (Priority, Region, Batch). Value: Numeric column, unaggregated: each row is one observation. Colour: Optional: colour boxes by group or by a flag column.
- 6
Check the first render, then format
One flat line per group: Value is being summed. Set the field to 'Don't summarize'. Quartiles that disagree with your DAX: different percentile method (inclusive vs. exclusive). Pick one and document it. Then open the formatting pane and set box fill and border colours, per group or shared.
Field wells the generated box plot 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.
| Well | Takes | Note |
|---|---|---|
| Group | Text column: one box per value (Priority, Region, Batch). | Set 'Sort by column' if the groups have a natural order (P1–P4). |
| Value | Numeric column, unaggregated: each row is one observation. | Quartiles are computed in the visual; don't bind a median measure. |
| Colour | Optional: colour boxes by group or by a flag column. | Grey boxes with one highlighted group reads best. |
Worked example
Ticket resolution hours by priority (the quartiles the visual computes from thousands of rows).
| Priority | Q1 | Median | Q3 | Outliers |
|---|---|---|---|---|
| P1 | 1.2 | 2.8 | 4.5 | 19.0, 23.5 |
| P2 | 4.0 | 9.1 | 16.3 | 61.0 |
| P3 | 12.5 | 26.0 | 48.8 | — |
| P4 | 30.1 | 71.4 | 118.0 | — |
What the chart draws: Four horizontal boxes widening from P1 to P4 with two P1 outliers near 20 hours: the breaches that an average of 3.4 hours would have hidden.
Live preview
The AI alternative: Describe your box plot in plain English and VizForge generates the .pbiviz, source included. 5 free credits on signup, no card required.
Generate a box plot 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 box plot, say:
- Whisker rule: Tukey 1.5× IQR with outlier dots, or min/max with no outliers.
- Horizontal or vertical boxes.
- Notched boxes for median confidence intervals, on or off.
- Mean marker (cross or line) in addition to the median.
- Small-sample behaviour: draw individual dots when a group has fewer than N rows.
Example VizForge prompt
Horizontal box plot of ticket resolution times split by priority (P1, P2, P3, P4). Include outlier dots beyond 1.5× IQR. Show median value inside each box.
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 box plot the options that earn their place are:
- Box fill and border colours, per group or shared.
- Whisker cap style and line width.
- Outlier marker shape, size and colour.
- Median and mean marker colours.
- Axis scale (linear or log) for long-tailed data.
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 box plot. If the audience only needs median and quartiles per group, a clustered bar of PERCENTILE measures is enough and needs no import. Choose a box plot when outliers matter (SLA breaches, defective batches) or when there are more than a handful of groups to compare side by side.
Limits of Marketplace box plot visuals
Marketplace box plots commonly fix the whisker rule (usually Tukey) and the outlier definition, and most compute quartiles with one method without saying which, so numbers can differ from your DAX PERCENTILE measures. Notches, log scales and small-sample fallbacks are rare. Row limits on free tiers bite because the visual needs raw rows.
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 box plot against this list before you connect the full dataset:
- One flat line per group: Value is being summed. Set the field to 'Don't summarize'.
- Quartiles that disagree with your DAX: different percentile method (inclusive vs. exclusive). Pick one and document it.
- Boxes squashed against the axis: one huge outlier sets the range; switch to a log axis or cap the axis.
- A box drawn for a group with three rows: enable the small-sample fallback so it shows dots instead.
When to use a box plot
- Order-value distributions by region
- Ticket-resolution-time distributions by priority
- Lab-result distributions across batches (quality control)
- Engagement-metric distributions across user cohorts
- Transaction-count distributions across branches
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.
Tukey whiskers or min/max?
Tukey 1.5×IQR by default (more informative, outliers shown separately). Specify 'min/max whiskers' in the prompt for the simpler variant.
Can I show the notch for median confidence?
Yes — prompt for 'notched box plot'. Useful when comparing two groups to see if medians differ significantly.
How does it handle very small samples?
Below 5 observations the visual renders individual dots instead of a box, with a subtle note explaining why.
Can I overlay the mean?
Yes — specify 'show mean as a cross' or 'show mean line' in the prompt.
Put your box plot on a designed page
Free Design Studio page layouts. Download the background, theme and PBIP project, then import the visual into the slot.
IT template
IT Service DeskHeader band, 5 KPIs, trend + gauge + donut, full-width breach-risk table
IT template
Cloud Cost (FinOps)Glass header card, 5 KPIs, stacked service area + team bars, unit-cost lines + savings table
IT template
Vulnerability ManagementLeft nav rail, 5 KPIs, open-findings trend + SLA bars, age columns + riskiest-asset table
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
Reference
Data shape, DAX measures, related visuals.
Index
One guide per Power BI visual type, plus the Design Studio guides.
VizForge — AI-generated Power BI custom visuals.