Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Team,
I'm trying to build a donut in PBI Table. I'm using this code to do so. However, as per the blog, >= 100% shows full solid circle with tick mark inside. However, I don't want to show tick. Even for 100% and greater I want percentage to display.
I tried this code.
Pie Chart SVG =
var PercentValue = IF([%Change] >.9999, [%Change], [%Change] ) var PercentA = PercentValue * 360
var CirclePercent = 180 - PercentA var ShortDistance = if(CirclePercent < 0, 1,0) var Radians = RADIANS(CirclePercent) var XArcEnd = sin(Radians) var YArcEnd = cos(Radians)
var circle = IF(PercentValue = 1, "<circle cx='0' cy='0' r='1' fill='green' />", IF(PercentValue > 1, "<circle cx='0' cy='0' r='1' fill='red' />", "<circle cx='0' cy='0' r='0.8' fill='white' />"))
var textvalue = IF(PercentValue >= .9999, "<text x='0' y='0' font-size='0.6' alignment-baseline='middle' text-anchor='middle' fill='white'>"&FORMAT(PercentValue,"0%")&"</text>", "<text x='0' y='0' text-anchor='middle' alignment-baseline='middle' font-size='0.6'>"&FORMAT(PercentValue,"0%")&"</text>")
RETURN
"data:image/svg+xml;utf8,<svg
xmlns='http://www.w3.org/2000/svg'
viewBox='-1 -1 2 2'>
<circle cx='0' cy='0' r='1' fill='lightgrey' />
<path d='M 0 -1 A 1 1 0 " & ShortDistance & " 1 " & XArcEnd & " " & YArcEnd & " L 0 0 z' fill='green'></path>"&
circle&textvalue&"
</svg>"
for one of the rows (marked) I'm getting extra outer green color
not sure from where I'm getting this. Can @KerKol please help me fixing this?
Thanks!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
75 | |
63 | |
51 | |
48 |
User | Count |
---|---|
211 | |
86 | |
64 | |
59 | |
56 |