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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors