deneb-visuals
Deneb visual creation, Vega/Vega-Lite spec authoring, and Deneb best practices for PBIR reports. Automatically invoke whenever the user mentions "Deneb" in any…
SVG generation via DAX measures and extension measures with ImageUrl data category for inline visualizations in PBIR reports. Automatically invoke when the user mentions "SVG visual", "DAX sparkline", "SVG measure", "inline graphics with DAX", "ImageUrl data category",
$ npx -y skills add data-goblin/power-bi-agentic-development --skill svg-visuals --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/svg-visualsContext preview
The summary Claude sees to decide when to auto-load this skill.
SVG generation via DAX measures and extension measures with ImageUrl data category for inline visualizations in PBIR reports. Automatically invoke when the user mentions "SVG visual", "DAX sparkline", "SVG measure", "inline graphics with DAX", "ImageUrl data category",
name: svg-visuals description: SVG generation via DAX measures and extension measures with ImageUrl data category for inline visualizations in PBIR reports. 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).
> **Use `pbir` for every report mutation.** The `pbir-format` skill 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`.
1. A DAX measure returns an SVG string prefixed with `data:image/svg+xml;utf8,` 2. The measure's `dataCategory` is set to `ImageUrl` 3. Power BI renders the SVG as an image in supported visuals
Before writing DAX, design the SVG visually:
1. **Query the model first** -- use DAX Studio or Tabular Editor CLI to get actual values with the intended filter context. Use real numbers, not placeholders. 2. **Write static SVG to a temp file** -- save to `/tmp/mockup.svg` and `open` it in a browser to preview layout, colors, and proportions. 3. **Ask for feedback** before converting to DAX -- iterating on static SVG is far easier than on DAX string concatenation. 4. **Colors must be hex codes with `#`** -- e.g., `fill='#2B7A78'`. Never use `%23` URL encoding or named colors. Always hex.
Create the extension measure in `reportExtensions.json` manually (see the `pbir-format` skill in the pbip plugin for JSON structure).
# Example using pbir_object_model (if available):
report.add_extension_measure(
table="Orders",
name="Sparkline SVG",
expression='''
VAR _Prefix = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30'>"
VAR _Bar = "<rect x='0' y='0' width='50' height='30' fill='#2196F3'/>"
VAR _Suffix = "</svg>"
RETURN _Prefix & _Bar & _Suffix
''',
data_type="Text",
data_category="ImageUrl",
display_folder="SVG Charts",
)
report.save()Before presenting the measure to the user, dispatch the `svg-reviewer` agent to validate syntax and provide design feedback.
Extension measures use `"Schema": "extension"` in the SourceRef:
{
"field": {
"Measure": {
"Expression": {
"SourceRef": {"Schema": "extension", "Entity": "Orders"}
},
"Property": "Sparkline SVG"
}
}
}For **image visuals**, bind the SVG measure through `pbir add visual image --image`; see `references/svg-image-visual.md`.
Validate with `pbir validate "Report.Report" --all` and inspect bindings with `pbir visuals bind "...Visual" --show`.
Before writing a custom SVG measure from scratch, check whether an existing UDF library already provides the chart type:
To check if a library is installed, look for functions/measures starting with `PowerofBI.IBCS.`, `Viz.`, `Compound.`, or `Element.`. Only write custom SVG DAX when no library function covers the required visualization. See `references/community-examples.md` for full function listings and additional libraries.
UDF libraries are installed into the semantic model, not the report. Use one of these tools:
Every SVG measure must follow a strict VAR-based structure. Organize code into clearly separated regions:
SVG Measure = -- CONFIG: Input fields and visual parameters VAR _Actual = [Sales Amount] VAR _Target = [Sales Target] VAR _Scope = ALLSELECTED ( 'Product'[Category] ) -- CONFIG: Colors VAR _BarColor = "#5B8DBE" VAR _TargetColor = "#333333" -- NORMALIZATION: Scale values to SVG coordinate space VAR _AxisMax = CALCULATE( MAXX( _Scope, [Sales Amount] ), REMOVEFILTERS( 'Product'[Category] ) ) * 1.1 VAR _AxisRange = 100 VAR _ActualNormalized = DIVIDE( _Actual, _AxisMax ) * _AxisRange -- SVG ELEMENTS: One VAR per visual element VAR _Svg
Power BI AI skills and Power BI agents for Claude Code and GitHub Copilot: a plugin marketplace of Power BI skills, subagents, and hooks for semantic models, DAX, TMDL, reports, and AI dashboards. Includes Microsoft Fabric skills and Fabric agents. Weekly updates.
Repo: data-goblin/power-bi-agentic-development
Deneb visual creation, Vega/Vega-Lite spec authoring, and Deneb best practices for PBIR reports. Automatically invoke whenever the user mentions "Deneb" in any…
Power BI custom visual (.pbiviz) development with the pbiviz toolchain and its MCP server. Automatically invoke when the user mentions "custom visual",…
Python visual creation and matplotlib/seaborn patterns for PBIR reports. Automatically invoke when the user mentions "Python visual", "matplotlib in Power BI",…
R visual creation and ggplot2 patterns for PBIR reports. Automatically invoke when the user mentions "R visual", "ggplot2", "ggplot in Power BI", or asks to…
Execute arbitrary Python or PySpark code on Fabric Spark compute without creating a notebook artifact; ephemeral Livy sessions with full Delta table access.…
Query Fabric lakehouse and warehouse data using DuckDB, either locally or inside a Fabric notebook. Automatically invoke when the user mentions "DuckDB",…