Which coffee shops are behind target? On a plain card and a grey table nobody can tell in two seconds. In this tutorial you build Power BI KPI cards with SVG and DAX and let Claude write the measures: a KPI card with a sparkline, a progress bar, a bullet chart, a status pill and a target donut. It stays 100% native: no custom visual, nothing to install. The example is Summit Coffee Co., 12 coffee shops in Denver, Austin, Portland and Boise.

⬇️ Join Free on Skool & Download the Practice File
Free membership · takes 1 minute · the file is in Classroom → Free Downloads from YouTube
Practice + Solution .pbix · Summit Coffee data · AI prompt template · answer key · .zip · Power BI Desktop
Recap
- KPI card with a sparkline
- Progress bar
- Bullet chart
- Status pill column
- Target donut

Tips for SVG Measures in Power BI
- Always set Data category to Image URL, and use rgb() colours only.
- Design every table image with the same height, because a table has one image size.
- Keep the rules prompt at the top of each AI chat and test on a copy of your report.
- If you publish to the Power BI service, test the table images there before you share the report.
Related tutorials: Restyle a Power BI report with a custom theme JSON and Dynamic conditional formatting in Power BI with one DAX measure. For more on SVG itself, see MDN’s SVG documentation.
Want a finished Power BI dashboard? See the Coffee Chains Dashboard in Power BI on NextGenTemplates.com. We also build custom Power BI and Excel dashboards on demand.
Frequently Asked Questions
How do I make Power BI KPI cards with SVG?
Write a DAX measure that returns text starting with data:image/svg+xml;utf8, followed by an <svg> element, set the measure's Data category to Image URL, then show it in the built-in Image visual or in a table column. Claude (or any AI chat) can write the measure if you give it a clear rules prompt.
Do I need a custom visual or the HTML Content visual?
No. The method uses only the built-in Image and Table visuals, so there is nothing to install and nothing for IT to approve.
Why does my SVG show as black or empty?
The most common cause is a # in a colour. Use rgb(46,125,50) instead of #2E7D32, because a hash sign cuts the data URI. Also avoid <line> and <polyline>: Power BI drops them silently. Draw with rect, circle, path and text.
Why does the table column show long text instead of a picture?
The Data category is not set. Select the measure, open Measure tools and set Data category to Image URL.
Why are the images in my table so small?
A table uses one image size for every image column. Select the table, open Format, and set the Image size height and width (24 by 200 in the video).
Does the AI always write the same measure?
No. AI answers change a little from run to run. Keep the rules prompt at the start of every chat, test each measure before you trust it, and send the error text back to the AI if something looks wrong.
Is the practice file free?
Yes. The zip has the Practice and Solution .pbix files, the Summit Coffee data in Excel, the prompt template and the answer key. The figures are example data for learning.
Download the Practice Files
Get the Practice and Solution .pbix files, the data, the prompt template and the answer key in one zip – free.
⬇️ Join Free on Skool & Download the Practice File
Free membership · takes 1 minute · the file is in Classroom → Free Downloads from YouTube
Practice + Solution .pbix · Summit Coffee data · AI prompt template · answer key · .zip · Power BI Desktop
About the Author
PK (Priyendra Kumar) runs PK: An Excel Expert and NextGenTemplates.com and has been teaching Excel, VBA and Power BI on YouTube for years. Every step in this tutorial was recorded in real Power BI Desktop with the files you can download above. The data is example data for learning.
Conclusion
With a few DAX measures that return SVG, the built-in Image and Table visuals turn into KPI cards, progress bars, bullet charts, status pills and donuts, and Claude does the typing. Download the free files, run the five prompts once and reuse the template for your own reports.



