cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jesenavaranjan Frequent Visitor
Frequent Visitor

SVG Image not working in PowerBi Service

Captured.PNGHi I created DAX SVG's which are showing fine in the Power Bi Desktop file but are not working in the Service.

 

Please help.

Jese

5 REPLIES 5
Community Support Team
Community Support Team

Re: SVG Image not working in PowerBi Service

Hi @jesenavaranjan ,

 

Based on my test, I cannot reproduce your issue here. To decide if the issue related to your Power BI service cluster, please download our test .pbix file as attached, publish it to service to see if it works fine on your side.

 

svg.PNG

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jesenavaranjan Frequent Visitor
Frequent Visitor

Re: SVG Image not working in PowerBi Service

HI!

 

I just tested that image and it works fine.

 

What can I do, as I'm stuck....

 

J

jesenavaranjan Frequent Visitor
Frequent Visitor

Re: SVG Image not working in PowerBi Service

Hi! but your file uses the SVG as a background Image.

My SVG's are DAX calculated and within a Table Visual

 

Community Support Team
Community Support Team

Re: SVG Image not working in PowerBi Service

Hi @jesenavaranjan ,

 

Could yuo please tell me the steps of your operation? So that I can test again by my side.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jesenavaranjan Frequent Visitor
Frequent Visitor

Re: SVG Image not working in PowerBi Service

ddd.PNG

That's my Image in Desktop.

Here is my DAX HEX Code:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="21.881697mm"
height="22.63765mm"
viewBox="0 0 21.881697 22.63765"
version="1.1"
id="svg8"
sodipodi:docname="Box2.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscapeSmiley Tongueageopacity="0.0"
inkscapeSmiley Tongueageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="31.679923"
inkscape:cy="70.79235"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-68.889275,-180.78568)">
<rect
style="fill:#ffd42a;stroke-width:0.24014251"
id="rect46"
width="21.881697"
height="22.63765"
x="68.889275"
y="180.78568" />
<rect
style="fill:#0000ff;stroke-width:0.26458332"
id="rect44"
width="15"
height="15"
x="72.463676"
y="184.79482" />
</g>
</svg>

 


I then Use two DAX formula:

1)

DaxHex = "data&colon;image/svg+xml;utf8," & SUBSTITUTE(SUBSTITUTE(vwMilestoneSummary[DaxStart],"#ffd42a",vwMilestoneSummary[PrevHRText]),"#0000ff",vwMilestoneSummary[CR Hex])
2) 
DaxwithTxt = SUBSTITUTE(vwMilestoneSummary[DaxHex], "</svg>","<text x='50%' y='50%' text-anchor='middle' font-family = 'Verdana' font-size='4px' fill='#000000'>" & vwMilestoneSummary[MilestoneID] & "</text></svg>")

And then make it an Image URL
J