
SVG Visuals
SVG generation via DAX measures and extension measures with ImageUrl data category for...
Install
npx skills add data-goblin/power-bi-agentic-development --skill svg-visuals -g -a claude-code -y- Repository
- data-goblin/power-bi-agentic-development1.1k
- Category
- Engineering
- Updated
- 5d ago
- License
- GPL-3.0
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- No, instructions only
What it does
SVG generation via DAX measures and extension measures with ImageUrl data category for inline visualizations in PBIR reports, including ready templates for matrix and table cells, new card images and per-button images on the new button slicer. Automatically invoke when the user mentions "SVG visual", "DAX sparkline", "SVG measure", "inline graphics with DAX", "ImageUrl data category", "extension measure", or asks to create any DAX-generated chart (progress bars, bullet charts, KPI indicators, data bars, gauges, donut charts, lollipop charts, dumbbell charts, status pills, overlapping bars, boxplots, IBCS bars, jitter plots, box-and-whisker charts).
SVG Visuals via DAX Measures (PBIR)
Use
pbirfor every report mutation. Thepbir-formatskill is read-only schema context. If the CLI is unavailable or lacks an operation, stop and report the gap.
Generate inline SVG graphics using DAX measures that return SVG markup strings. These render as images in table, matrix, card, image, and slicer visuals. Store as extension measures in reportExtensions.json.
How It Works
- A DAX measure returns an SVG string prefixed with
data:image/svg+xml;utf8, - The measure's
dataCategoryis set toImageUrl - Power BI renders the SVG as an image in supported visuals
Supported Visuals
- Table (
tableEx):grid.imageHeight/grid.imageWidth--references/svg-table-matrix.md - Matrix (
pivotTable): same as table --references/svg-table-matrix.md - Image (
image):sourceType='imageData'+sourceField--references/svg-image-visual.md - Card/New (
cardVisual): theimageobject (image area) orcardImage(callout image) --references/svg-template-matrix.md, patterns inreferences/svg-card-slicer.md - Slicer/New (
advancedSlicerVisual): one image per button through the image "Select from data" slot --references/svg-template-matrix.md
Start From a Template
Before writing DAX by hand, check references/svg-template-matrix.md: it maps each pattern (bullet, progress, pill, sparkline, dumbbell, diverging, delta, pin, gauge) to the hosts it fits (an SVG on its own goes in an image visual, a card is for a number), shows the verified PBIR wiring per host, and gives the one-step pbir visuals svg / pbir add gauge-card commands that write the pattern as a thin report measure and wire it in. Hand-write SVG DAX only for a shape no template covers.
Workflow: Creating an SVG Measure
Step 0: Design and Preview
Before writing DAX, design the SVG visually:
