Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi,
I was trying to make a measure to show a battery 80% filled in DAX. The measure, SVG Battery Measure, doesn't work, even though I got no error message, the category is set as image URL and I have HTML content custom visual installed. I attach the measure as an image.
The full svg code of the battery I got in Notepad is written below, so I created a measure to show me the path (I copied the path from the code below) and named it SVG Battery Path. The battery svg image I used can be found in PowerPoint.
"<svg width='302' height='165' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' overflow='hidden'><g transform='translate(-2049 -1155)'><path d='M2337.27 1206.56 2323.55 1206.56 2323.55 1168.75C2323.55 1161.19 2317.37 1155 2309.82 1155L2062.73 1155C2055.18 1155 2049 1161.19 2049 1168.75L2049 1306.25C2049 1313.81 2055.18 1320 2062.73 1320L2309.82 1320C2317.37 1320 2323.55 1313.81 2323.55 1306.25L2323.55 1268.44 2337.27 1268.44C2344.82 1268.44 2351 1262.25 2351 1254.69L2351 1220.31C2351 1212.75 2344.82 1206.56 2337.27 1206.56ZM2302.95 1299.38 2069.59 1299.38 2069.59 1175.62 2302.95 1175.62 2302.95 1299.38Z' fill-rule='evenodd'/><path d='M2083 1189 2111 1189 2111 1286 2083 1286Z' fill-rule='evenodd'/><path d='M2127 1189 2155 1189 2155 1286 2127 1286Z' fill-rule='evenodd'/><path d='M2172 1189 2199 1189 2199 1286 2172 1286Z' fill-rule='evenodd'/><path d='M2216 1189 2243 1189 2243 1286 2216 1286Z' fill-rule='evenodd'/><path d='M2260 1189 2287 1189 2287 1286 2260 1286Z' fill-rule='evenodd'/></g></svg>"
This is the measure (image):
Thanks!
is this a Custom Visual? Try either that forum, or possibly the author of said visual.
Proud to be a Super User! | |
HTML content is a custom visual, but people work with SVGs in PowerBI for years. I watched hours of tutorials on the topic and tried to replicate, but it didn't work.