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

Comma-separated, exactly as named in your model, e.g. [Total Sales], Sales[Target].

1 credit · refunded if it fails

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 as url(%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 xmlns and a viewBox, 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

  1. 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.

  2. 02

    Generate and review

    Click Generate. In 5–20 seconds you get the measure, a rendered preview and setup notes; copy the DAX.

  3. 03

    Create the measure

    In Power BI Desktop, select the table that should hold it, choose New measure and paste the DAX.

  4. 04

    Set the data category

    With the measure selected, open Measure tools and set Data category to Image URL.

  5. 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.

See credit packs

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.

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 →

Make the report.
Then make it yours.

The Design Studio, templates and tools are free with no account (exports carry a small VizForge mark until you sign in). Sign up when you want AI: 5 credits on us, no card.

Generated visuals are type-checked and built before you download them; one that fails the quality SLA refunds its credits. See all features or pricing.