Forum Discussion
SVG image not able to process the image
- Anonymous1 year ago
Hi Anonymous ,
According to your description, going to populate a custom image in a svg image after my testing, power bi doesn't seem to parse it. But you can turn it into a whole image through an external site before exporting it. Here are the steps to do it
First, you need to convert your image to base64 encoding
Base64 Image Encoder (base64-image.de)
Then use this to display your target image.
SVG Viewer - View, edit, and optimize SVGsGo to data url and get the base64 code of the whole image
Use SVG in measure
Measure = SWITCH( TRUE(), SELECTEDVALUE('Table'[Value]) = 1,"data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'> <image href='data:image/svg+xml;base64,[Your base64 code]' x='0' y='0' height='100' width='100'/> </svg>" )Final output
For dynamic selection, you can put these base64 codes in the same table and splice them together using the measure
Best regards,
Albert HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Anonymous ,
According to your description, going to populate a custom image in a svg image after my testing, power bi doesn't seem to parse it. But you can turn it into a whole image through an external site before exporting it. Here are the steps to do it
First, you need to convert your image to base64 encoding
Base64 Image Encoder (base64-image.de)
Then use this to display your target image.
SVG Viewer - View, edit, and optimize SVGs
Go to data url and get the base64 code of the whole image
Use SVG in measure
Measure =
SWITCH(
TRUE(),
SELECTEDVALUE('Table'[Value]) = 1,"data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'> <image href='data:image/svg+xml;base64,[Your base64 code]' x='0' y='0' height='100' width='100'/> </svg>"
)
Final output
For dynamic selection, you can put these base64 codes in the same table and splice them together using the measure
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly