Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
anusha_2023
Helper IV
Helper IV

SVG Image is not respecting the Slicer selection

I have added an SVG Measure for the Percentage vaue to show which is perfect

Radial Gauge =

VAR MAXPlan = 1 // enter value or measure

VAR MAXActual = [Var Forecost] // enter value or measure

VAR AXISRANGE = MAXX(
    {
        MAXPlan,
        MAXActual
    },
    [Value]
)

// Capped percentage for the arc fill (max 100%)
VAR PERCENTAGEFILL = MIN(MAXActual / AXISRANGE, 1)

// Adjust target percentage for negative MAXActual
VAR PERCENTAGETARGET = IF(MAXActual < 0, 1 + (MAXActual / AXISRANGE), PERCENTAGEFILL)

RETURN
"data&colon;image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width= '100' height= '50' display= 'block' viewBox='-5 -5 110 70' overflow='visible'>
      <path id='track' fill='none' stroke='lightgrey' d='M10,55 a45,45 0 1 1 90,0' stroke-width='20' />
      <path id='fill' fill='none' stroke=" & IF(PERCENTAGEFILL<0.50, "'#62825D'", IF(PERCENTAGEFILL<0.65, "'#FAB12F'", "'#e62c29'")) & " d='M10,55 a45,45 0 1 1 90,0' stroke-width='20' stroke-dasharray='141.3717' stroke-dashoffset='" & (1-PERCENTAGEFILL) * (PI() * 45) & "'></path>
      <path id='target' fill='black' stroke='white' d='M0,55 L20,55' stroke-width='5' transform='rotate(" & PERCENTAGETARGET * 180 & " 55 55)'/>
      <path id='target' fill='black' stroke='black' d='M0,55 L20,55' stroke-width='3' transform='rotate(" & PERCENTAGETARGET * 180 & " 55 55)'/>
      <text x='55' y='55' text-anchor='middle' font-family='Segoe UI' font-weight='bold'>" & FORMAT(MAXActual, "0%") & "</text>
    </svg>"
 
This is result of the Image and the percentage
anusha_2023_0-1731961570635.png

Slicer is on Manager Name is not selected for below two names and they are also coming when SVG Image is added to the Matrix otherwise if SVG Image is deleted from the Matrix only these below rows are coming

anusha_2023_1-1731961721771.png

 

How can I addd SVG Image to only these rows where percentage is exist. Is this problem is because of the SVG Image?

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Return BLANK() if you don't want to show the SVG.

View solution in original post

2 REPLIES 2
anusha_2023
Helper IV
Helper IV

Thanks for the reply. I missed to identify the most easiest part even after one year of experience with DAX.

lbendlin
Super User
Super User

Return BLANK() if you don't want to show the SVG.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors