cancel
Showing results for 
Search instead for 
Did you mean: 

SVG not loading in gallery (works in Desktop)

 

I created the following DAX measure to produce an SVG image:

 

Calc Red X = "data&colon;image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg'
 width='19.000000px' height='19.000000px' viewBox='0 0 32.000000 30.000000'
 preserveAspectRatio='xMidYMid meet'>
<g transform='translate(0.000000,30.000000) scale(0.100000,-0.100000)'
fill='#FD625E' stroke='none'>
<path d='M55 240 c-3 -5 12 -29 34 -52 l40 -43 -42 -42 c-32 -34 -38 -46 -29
-55 9 -9 20 -4 50 25 21 20 42 37 48 37 6 0 25 -16 44 -35 19 -19 40 -35 47
-35 24 0 13 34 -24 72 l-37 38 37 38 c63 65 41 89 -24 26 l-37 -36 -31 22
c-16 13 -32 29 -35 37 -6 15 -32 18 -41 3z'/>
</g>
</svg>"

 

 

I have set the Data Category to Image URL. This works great in desktop, but the images won't load on the service.

 

 

 

 

Status: Accepted
Comments
Moderator

Hi @Evan_at_DD,

 

Which visual do you use to display this measure value? Based on my test in Power BI desktop, the measure can't visualize as a image. 

 

q4.PNG

 

Best Regards,
Qiuyun Yu 

Moderator
Status changed to: Needs Info
 
Frequent Visitor

Hi Qiuyun,

Thanks for helping. I am using a matrix:

 

When I posted the DAX code some the website replaced a colon with "&colon;"

 

Here is an image of the code:DAX.PNG

 

Moderator

Hi @Evan_at_DD,

 

Thank you for your email with pbix file. 

 

I have tested your pbix file in Power BI desktop version 2.62.5222.601 64-bit (September 2018), the measure in your report plot a broken image in a matrix visual. Which Power BI desktop version do you mean it's able to plot the image from that measure? 

 

q4.PNG

 

Best Regards,
Qiuyun Yu 

Frequent Visitor

I have Version: 2.61.5192.601 64-bit (August 2018)

 

thank you, Evan

 

Frequent Visitor

@v-qiuyu-msftcan you check this when you have a moment?

Moderator

Hi @Evan_at_DD,

 

As you mentioned the SVG image works in desktop, please share pbix file with us. You can upload it to your OneDrive or Dropbox, post the shared link here. Do remove sensitive data before sharing. 

 

Best Regards,
Qiuyun Yu 

Moderator

Hi @Evan_at_DD,

 

I have tested your pbix file in PBI desktop August version as yours, but the image doesn't display. Are you sure the image works fine in this desktop version? You can install Power BI desktop version 2.61.5192.601 64-bit (August 2018) here: https://www.dropbox.com/s/osvb4vir20a8wea/PBIDesktop_x64%202.61.5192.601%20%28August%202018%29.msi?d...

 

q2.PNG

 

Best Regards,
Qiuyun Yu 

Frequent Visitor

Hi @v-qiuyu-msft  That picture you shows DOES have the correct image appearing.

The image is a little red X.

 

Frequent Visitor

It appears the image was also appearing in the September version. I just didn't notice that your screenshot showed it working.