DAX SVG measure · Status

Icon and value KPI tile with a DAX SVG measure

Icons help a row of KPIs scan: the eye finds 'customers' by the people icon before reading. This measure draws one of the line icons from the Design Studio's icon set in a tinted circle, the formatted value and an optional caption, and can colour the icon green or red against a target.

By · Founder & Reliability Engineer · Updated

Icon + value rendered from the DAX below with sample data
Rendered from the measure below with sample data at 2× (150×44 px in Power BI). 680 characters.

Use it when

  • A strip of KPI tiles where each metric needs a quick visual anchor.
  • Table rows representing different entity types (orders, returns, tickets).

Skip it when

Icons would be decoration only: if every tile gets an arbitrary icon, they add noise. Use them only where the icon names the metric.

Three looks

The icon + value in three palettes; click one to edit it.

Data it needs

The builder asks for exactly these fields; type your own measure and column names there.

Value measure
Formatted with the format you pick (thousands, millions or percent).
Target measure (optional)
Only for threshold colouring: green at or above target.

The full DAX

Swap [Revenue] and [Revenue Target] for your own names.

Icon Value (measure)
Icon Value =
-- VizForge SVG measure: icon (currency-dollar) with value.
-- Set Measure tools > Data category = Image URL, then size it under Format > Visual > Image size.
-- Icon: Lucide (ISC licence).
-- Made with the free VizForge SVG measure builder: vizforge.ai/tools/svg-measure-builder
-- Need per-point tooltips, click-to-select inside the chart or Format-pane settings? Generate it as a real custom visual: vizforge.ai/visuals
VAR _Value = [Revenue]
VAR _Colour = "%23118DFF"
RETURN
    IF (
        ISBLANK ( _Value ),
        BLANK (),
        "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='44' viewBox='0 0 150 44'><circle cx='22' cy='22' r='22' fill='"
            & _Colour
            & "' fill-opacity='0.14'/><g transform='translate(11 11) scale(0.917)' fill='none' stroke='"
            & _Colour
            & "' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='12' x2='12' y1='2' y2='22'/><path d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/></g><text x='55' y='20' font-family='Segoe UI, Helvetica, Arial, sans-serif' font-size='18' font-weight='700' fill='%23252423'>"
            & FORMAT ( _Value, "#,0.0,,""M""", "en-US" )
            & "</text><text x='55' y='37' font-family='Segoe UI, Helvetica, Arial, sans-serif' font-size='11' fill='%23605E5C'>Revenue</text></svg>"
    )
DAX user-defined function variant (VizForge.SvgIconValue)

One-line call: Icon Value = VizForge.SvgIconValue ( [Revenue] )

DAX query view script
-- 1) Paste into DAX query view and choose 'Update model with changes'.
--    Needs DAX user-defined functions (generally available since the June 2026 Power BI release).
DEFINE
    /// Icon + value as an SVG image URL (VizForge). Optional parameters default to the colours you picked.
    FUNCTION VizForge.SvgIconValue = (
            pValue : NUMERIC,
            pIconColor : STRING = "#118DFF",
            pTextColor : STRING = "#252423",
            pLabelColor : STRING = "#605E5C"
        ) =>
        VAR _Value = pValue
        VAR _Colour = SUBSTITUTE ( pIconColor, "#", "%23" )
        RETURN
            IF (
                ISBLANK ( _Value ),
                BLANK (),
                "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='44' viewBox='0 0 150 44'><circle cx='22' cy='22' r='22' fill='"
                    & _Colour
                    & "' fill-opacity='0.14'/><g transform='translate(11 11) scale(0.917)' fill='none' stroke='"
                    & _Colour
                    & "' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='12' x2='12' y1='2' y2='22'/><path d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/></g><text x='55' y='20' font-family='Segoe UI, Helvetica, Arial, sans-serif' font-size='18' font-weight='700' fill='"
                    & SUBSTITUTE ( pTextColor, "#", "%23" )
                    & "'>"
                    & FORMAT ( _Value, "#,0.0,,""M""", "en-US" )
                    & "</text><text x='55' y='37' font-family='Segoe UI, Helvetica, Arial, sans-serif' font-size='11' fill='"
                    & SUBSTITUTE ( pLabelColor, "#", "%23" )
                    & "'>Revenue</text></svg>"
            )

EVALUATE { VizForge.SvgIconValue ( [Revenue] ) }

-- 2) Then create the measure and set Measure tools > Data category = Image URL:
-- Icon Value = VizForge.SvgIconValue ( [Revenue] )
--    Colours and thresholds are optional parameters: pass a value after the fields to override one.
--    Pass colours as plain "#RRGGBB"; the function encodes the # for the data URI.

Placing it in a report

150 × 44 is a small tile: good as the Card visual's image (Visual > Image) or in a matrix of KPIs. Pick an icon in the builder; the path is embedded, so no image hosting is needed. Remember the Image URL data category. All setup steps.

Gotchas

When an SVG measure isn't enough

A KPI tile visual can drill through to a detail page and show a breakdown tooltip. See the KPI card custom visual for what an interactive version can do.

KPI card designs using it

Finished designs built on this pattern, from the KPI card gallery.