Forum Discussion
Get a single value into an SVG Measure
- Anonymous4 years ago
I finaly got it to work.
The problem was in the SVG code, specificcaly the line
stroke-dasharray='calc("&__pourcent&" * 458.67 / 100) 468.57'The numbers 458.67 and 468.57 should be the same, and depend on the circonference of the circle, here 229.33 because radius = 36,5.
So the correct line is
stroke-dasharray='calc("&__pourcent&" * 229.3363 / 100 ) 229.3363'and Power Query/BI returns the correct value by any mean.
Problem solved
Hi, Anonymous ;
Can you post sample data as text and expected output?
Not enough information to go on;
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sure, I'll Try to answer best I can ;
As you can see, the code I posted is HTML/SVG code. It defines an image in SVG format (scalar vector).
In this code I have avriable named " __pourcent". I want to assign a value to this variable, and tha values are the one in the calculated column I posted aswell. Now the HTML-SVG code is stored in a measure, So I guess the question is : How do I fetch one value in a column from a measure ?
I'm asking for the DAX code that would alow me to reach one single value from a specific column.
Now about your requirement ;
1) I can't post any sample data as they're confidential. Nonetheless, I can picture the expected output :
2)
I want to diasplay a table visual. Each line from this visual is a line from a Table1. My Table1 has a "score" column I show in the main post. Instead of displaying a score as a number, I want to show it as a pie chart just like the picture above.
3) I miss the dax code to get from my value in the score column into a measure that diasplays the pie chart.