Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
yaseenhamid
Frequent Visitor

Cant enter location variable in SVG code

hi, im trying to add location variable  in following svg code but power bi cant recognize syntax

 

var location = "100"

 

"data:image/svg+xml;utf8,"
        & "<svg xmlns=""http://www.w3.org/2000/svg""   >
   
<path d="M150 0 L75 200 L225 200 Z"></path>
   

</svg>"
 
i want to add location variable instead of 150 in above code (e.g <path d="M location 0 L75 200 L225 200 Z"></path>
1 REPLY 1
lbendlin
Super User
Super User

var location = "100"
return "data&colon;image/svg+xml;utf8,<svg xmlns=""http://www.w3.org/2000/svg""><path d=""M" & location & " 0 L75 200 L225 200 Z""></path></svg>"

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors