AI tool · 1 credit · refunded if it fails
AI DAX SVG measure generator
Describe the graphic you want in a table, matrix or card — a KPI tile with a trend arrow, a progress bar, a bullet chart, a red/amber/green pill — and get a ready-to-paste DAX measure that draws it as an SVG image.
Want a fixed template instead? The free SVG measure builder needs no account.
Try an example
What you get
- The DAX measure, written with
VAR … RETURN, BLANK handling and ratios clamped so odd values never draw outside the image. - A rendered preview of the same SVG with sample values, so you can see it before you paste anything.
- Setup notes: the Image URL data category, where to place the measure and what image size to set.
A typical result looks like this progress bar:
Progress Bar SVG =
VAR _pct = MIN(MAX(DIVIDE([Actual], [Target]), 0), 1)
VAR _w = ROUND(_pct * 200, 0)
RETURN
"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 24' width='240' height='24'>" &
"<rect width='200' height='12' y='6' rx='6' fill='%23E6E6E6'/>" &
"<rect width='" & _w & "' height='12' y='6' rx='6' fill='%230F766E'/>" &
"<text x='206' y='16' font-family='Segoe UI, sans-serif' font-size='11'>" &
FORMAT(_pct, "0%") & "</text></svg>"Checked before you see it
Most hand-written SVG measures fail for a handful of reasons that Power BI reports only as a blank cell. Every result is checked on the server for those first:
- DAX string, quote, bracket and parenthesis balance, and VAR without RETURN.
- No raw
#inside the data URI (colours as%23RRGGBB, gradient refs asurl(%23id)). - The SVG that the DAX itself builds (rebuilt from its string pieces, with values filled in as 0), as well as the preview, parses as XML, has
xmlnsand aviewBox, and uses no scripts, foreignObject, event handlers or external files. - Only the field names you listed are referenced.
- Size limits that keep the image URL well under Power BI's 32,766-character text limit.
How to use an AI-generated SVG measure in Power BI
- 01
Describe the image
Pick an example or describe the graphic, list the measures and columns it should use with their exact names, and add colours if you have brand colours.
- 02
Generate and review
Click Generate. In 5–20 seconds you get the measure, a rendered preview and setup notes; copy the DAX.
- 03
Create the measure
In Power BI Desktop, select the table that should hold it, choose New measure and paste the DAX.
- 04
Set the data category
With the measure selected, open Measure tools and set Data category to Image URL.
- 05
Place and size it
Add the measure to a table or matrix column, or to the image of a Card (new). In the Format pane set the image height and width to match the SVG.
Limits
- Descriptions up to 2,000 characters; up to 12 field names and 8 colours.
- The measure is checked for syntax and Power BI rendering rules, not run against your model: a field name that doesn't exist in your model still errors in Desktop.
- Images are static. Text inside the SVG uses Segoe UI and does not wrap automatically.
- Generated DAX is capped at 16,000 characters and the SVG at 30,000; very dense charts (hundreds of points) belong in a visual, not a measure.
- Up to 6 generations a minute and 60 an hour per account.
Pricing
Each generation costs 1 credit ($0.70–$1.00 depending on the pack). The credit is reserved when you click Generate and refunded automatically if the AI times out, refuses, or its output fails validation after one automatic repair. Credits are one-time packs, not a subscription, and are shared with the custom visual generator.
Questions
What is a DAX SVG measure?
A measure that returns text starting with data:image/svg+xml;utf8, followed by SVG markup built from your numbers. When the measure's Data category is set to Image URL, Power BI draws the text as an image in a table, a matrix, the image slot of a Card (new) or the Image visual, so you get KPI cards, sparklines and data bars without a custom visual.
Why does my SVG measure show a broken image or get cut off?
The three usual causes are a raw # character (Power BI cuts a utf8 data URI at the first #, so colours must be written %23RRGGBB), a missing xmlns='http://www.w3.org/2000/svg' on the <svg> element, and double quotes inside the DAX string that end it early. The generator rejects all three before you see the result.
How is this different from the free SVG measure builder?
The free builder fills in fixed templates in your browser. The AI generator writes a new measure from a description — any layout, your field names, your colours — and then validates it. Use the builder when a template fits, and the AI when it doesn't.
Does the AI see my data?
No. You send a description and, optionally, field names and colours. The AI never connects to your model; the preview uses sample values it invents.
What happens if the result is wrong?
Your credit is reserved when you click Generate. The output is then checked: DAX quote, bracket and parenthesis balance, the SVG that the DAX itself builds must parse as XML with xmlns and a viewBox, field references must match the names you gave, and size limits apply. If a check fails, the AI gets one automatic repair attempt with the exact errors; if that fails too, the credit is refunded.
Can the SVG be interactive?
No. Power BI renders SVG measures as static images: no tooltips on parts of the image, no animation scripts and no cross-filtering from shapes inside it. Interactions still work on the table row or card that holds it. For an interactive chart, use a Deneb spec or a custom visual.
Related tools
- Free SVG measure builder
Fill in proven SVG measure templates in the browser — no account, no credits.
- Deneb spec generator
Need an interactive chart instead of an image? Generate a Vega-Lite spec for Deneb.
- KPI card designs
Finished KPI cards as copy-ready DAX SVG measures, free.
- Power BI icons
Copy any icon as a DAX SVG measure in your brand colour.
- Custom visual catalog
Full custom visuals generated by AI, packaged as .pbiviz.
Need a chart Power BI doesn’t ship?
Describe it in plain English and VizForge generates a custom visual as a .pbiviz file, with its TypeScript source. In the design studio, hand any visual slot to the AI and the brief carries the slot size and your brand colours. Sankey, Gantt, bullet, waterfall and more: see the visual catalog.
Generate a custom visual with AI · starts free →