deldersveld
8 years agoResident Rockstar
SVG Sparklines - Line
Power BI now allows the dynamic creation of Scalable Vector Graphics (SVG) images. Prior to the August 2018 version, it was possible to build SVG content into custom columns, but now it is possible t...
deldersveld
7 years agoResident Rockstar
Did you include the "data:image/svg+xml;utf8," prefix before the SVG text and then set the measure's data category to ImageURL?
cmajs
7 years agoFrequent Visitor
I think so. This is what I have:
VAR SVGImageURL = IF(HASONEVALUE('Diario'[Cadena]),
"data:image/svg+xml;utf8," &
"<svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' viewBox='0 0 100 100'>" &
"<polyline fill='none' stroke='" & LineColor &
"' stroke-width='3' points='" & Lines &
"'/></svg>",
BLANK())
- deldersveld7 years agoResident Rockstar
Apart from where this forum transformed my reply from an actual colon symbol to &colun, the variable looks good. Is 'Diario'[Cadena] in your table then as well?
- cmajs7 years agoFrequent Visitor
I am using Diario[Cadena] as category and yes, I have it in my table. Any other idea of what could be wrong?
- deldersveld7 years agoResident Rockstar
The only other thing I can think of would be in the code above to fill in the "Lines" variable. Are you comfortable sharing your PBIX or the full measure?