Forum Discussion
Anonymous
6 years agoNot applicable
Dynamic bubble chart percentages
Hello, I have dynamics bubble chart . The code is here: KPI = VAR kpiColor = "#00BFFF" VAR kpiBlock = "data:image/svg+xml;utf8,<svg height='400' width=...
- 6 years ago
Hi Anonymous ,
Try to change your measure in order to format the OG YTD measure something similar to this:
KPI = VAR kpiColor = "#00BFFF" VAR kpiBlock = "data:image/svg+xml;utf8,<svg height='400' width='400' xmlns='http://www.w3.org/2000/svg'><circle cx='200' cy='200' r='" & FORMAT ( [KPI Radius]; "###" ) & "' stroke='" & kpiColor & "' stroke-width='1' fill='" & kpiColor & "' />" & " <text x='50%' y='50%' text-anchor='middle' stroke='balck' stroke-width='2px' dy='.3em'>" & FORMAT ( [OG YTD]; "## %" ) & "</text>" & "</svg>" RETURN IF ( HASONEFILTER ( Finance[Hierarchy Level] ); kpiBlock )
MFelix
Super User
6 years agoHi Anonymous ,
Try to change your measure in order to format the OG YTD measure something similar to this:
KPI =
VAR kpiColor = "#00BFFF"
VAR kpiBlock =
"data:image/svg+xml;utf8,<svg height='400' width='400' xmlns='http://www.w3.org/2000/svg'><circle cx='200' cy='200' r='"
& FORMAT ( [KPI Radius]; "###" ) & "' stroke='" & kpiColor & "' stroke-width='1' fill='" & kpiColor & "' />" & " <text x='50%' y='50%' text-anchor='middle' stroke='balck' stroke-width='2px' dy='.3em'>"
& FORMAT ( [OG YTD]; "## %" ) & "</text>" & "</svg>"
RETURN
IF ( HASONEFILTER ( Finance[Hierarchy Level] ); kpiBlock )- Anonymous6 years agoNot applicable
Hi MFelix ,
Thank you, it's working.
Can you help me with the font size too? Now the font size is tiny, but the the Visualization "Format" funkcion not effect it. I think I should make some change in the code.
Thank you,
Anett
- v-lionel-msft6 years ago
Community Support
Hi Anonymous ,
Like MFelix said, try to add font size property to the text label.
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.