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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

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 others find it more quickly.
Anonymous
Not applicable

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

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

 

Anonymous
Not applicable

HI!

 

I just tested that image and it works fine.

 

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

 

J

Hi @Anonymous ,

 

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 others find it more quickly.
Anonymous
Not applicable

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"
inkscape:pageopacity="0.0"
inkscape:pageshadow="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


 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors