Power BI How-To
How to make a violin plot in Power BI
Build a violin 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 violin plot shows the shape of a distribution, not just its summary: a mirrored density curve with a small box plot inside, one violin per group. It exposes the bimodal salary distribution or the long tail of response times that a bar of averages, or even a box plot, flattens away.
Power BI has no native violin plot and no density estimation. This guide builds one from a two-column shape (group and observation), explains the bandwidth setting that decides whether the shape is honest or smoothed into nothing, and covers the row-count limits that matter because the visual needs the raw observations, not an aggregate.
Step-by-step
- 1
Shape the data for the violin 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 raw response times, a few hundred rows per tier, rather than the six sample rows or a summary table. The density shape needs real observations; a handful of points draws spikes, not a violin.
- 3
Describe the violin plot and generate the .pbiviz
On VizForge, describe the chart in plain English and say what matters for this one: vertical or horizontal violins; box plot overlay on/off, and whether to mark the mean as well as the median; bandwidth: Silverman's rule (default) or a fixed multiplier. 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 violin per value (Department, Tier). Value: Numeric column (not a measure): each row is one observation. Colour: Optional text column or the group itself.
- 6
Check the first render, then format
A single thin line per group: Value was dropped as a measure (Sum), so each group has one point. Set it to 'Don't summarize'. Violins all the same smooth shape: bandwidth is too large; lower the multiplier. Then open the formatting pane and set fill colour per group and fill opacity.
Field wells the generated violin 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 violin per value (Department, Tier). | Keep to a dozen groups or fewer; beyond that use a slicer. |
| Value | Numeric column (not a measure): each row is one observation. | The visual computes density itself, so it needs the unaggregated values. |
| Colour | Optional text column or the group itself. | Sequential colour by group median is a common choice. |
Worked example
Response times (seconds) for three service tiers, a few of the thousands of rows.
| Tier | Response time |
|---|---|
| Gold | 0.8 |
| Gold | 1.1 |
| Silver | 1.4 |
| Silver | 4.9 |
| Bronze | 2.2 |
| Bronze | 11.6 |
What the chart draws: Three violins. Gold is narrow and short; Silver is wide at the bottom with a thin tail; Bronze has two bulges, a quick path and a slow one, which is the bimodality the chart is for. Each violin contains a box with median and quartiles.
Live preview
The AI alternative: Describe your violin plot in plain English and VizForge generates the .pbiviz, source included. 5 free credits on signup, no card required.
Generate a violin 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 violin plot, say:
- Vertical or horizontal violins.
- Box plot overlay on/off, and whether to mark the mean as well as the median.
- Bandwidth: Silverman's rule (default) or a fixed multiplier.
- Outlier points beyond 1.5× IQR shown or hidden; optional beeswarm dots for small samples.
- Shared Y scale across groups or per-group scaling.
Example VizForge prompt
Vertical violin plot comparing response times across 5 service tiers. Include a box plot overlay per violin, show outlier points beyond 1.5× IQR. Color violins by tier with a sequential green-to-red scale.
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 violin plot the options that earn their place are:
- Fill colour per group and fill opacity.
- Bandwidth multiplier slider.
- Box width, median line colour and whisker style.
- Outlier marker size and colour.
- Axis range (fixed or auto) and gridlines.
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 violin plot or box plot. A clustered column chart of percentiles (P10, P50, P90 as measures) is enough when the audience wants three numbers per group. A histogram built from a binned column is enough for one group at a time. Choose a violin when you need to compare several distributions and their shape (skew, tails, bimodality) is the point.
Limits of Marketplace violin plot visuals
Marketplace violin plots fix the density estimator and usually its bandwidth, so very different distributions get the same smoothing. Row limits on the free tier are common because the visual needs raw observations, and the box overlay and outlier rules are rarely configurable. You can't add a well to colour violins by a separate measure.
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 violin plot against this list before you connect the full dataset:
- A single thin line per group: Value was dropped as a measure (Sum), so each group has one point. Set it to 'Don't summarize'.
- Violins all the same smooth shape: bandwidth is too large; lower the multiplier.
- Groups missing: Power BI's row cap was hit; filter to the period you need or sample in Power Query.
- Outliers drawn inside the violin body: the Y scale is per group; switch to a shared scale for comparison.
When to use a violin plot
- Salary distribution by department
- Response-time distribution across service tiers
- Test score distributions by cohort or school
- Order-value distribution by acquisition channel
- Sensor-reading distributions by device type
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.
Violin plot vs. box plot — which should I use?
Violin for distributions that might be bimodal, skewed, or have important tail structure. Box plot when you just need median + quartiles and space is tight.
How is the kernel bandwidth chosen?
Silverman's rule of thumb by default. Prompt for a specific bandwidth multiplier if your data needs smoother or tighter fits.
Can I overlay all data points as dots?
Yes — request 'beeswarm dots overlay' in the prompt for scatter-point overlay; useful for small samples.
Horizontal or vertical?
Both. Vertical works well for many groups with short labels; horizontal is easier when group labels are long.
Put your violin plot on a designed page
Free Design Studio page layouts. Download the background, theme and PBIP project, then import the visual into the slot.
Insurance template
Insurance ClaimsGradient band header, 5 KPIs, reported vs closed trend + loss-ratio bars, claim-journey funnel + large-loss register
Insurance template
Insurance Underwriting PortfolioLeft nav rail, 4 outline KPIs, new-vs-renewal premium + channel donut, ratios + rate/retention scatter + broker table
HR & people template
HR Headcount & AttritionLeft nav rail, 4 KPIs, two trend panels, three-panel workforce row
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.