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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
rohan_mate
Regular Visitor

KPI Indicator - Circular Dependency Issue

Hey Guys,

 

I'm trying to build a KPI indicator inside the table visual, learning from the 

https://dataveld.com/2018/07/16/use-svg-images-in-power-bi-part-3. I have put foward the below KPI,

 

KPI =
VAR MessageTextComplete = LOOKUPVALUE('HR Tracking Tool'[Quater year],[Current Status],"Complete")
VAR MessageTextBehind = LOOKUPVALUE('HR Tracking Tool'[Quater year],[Current Status],"In Progress - Behind")
VAR MessageTextTrack = LOOKUPVALUE('HR Tracking Tool'[Quater year],[Current Status],"In Progress - Tracking Well")
VAR MessageText = ""
VAR Radius = 9
VAR ColorRed ="red"
VAR ColorBlue ="blue"
VAR ColorGreen ="green"
VAR ColorYellow ="yellow"
VAR Opacity = 0.75
VAR Neutral="data&colon;image/svg+xml;utf-8," & "<svg xmlns='http://www.w3.org/2000/svg' x=’0px’ y=’0px’ width=’50’ height=’20’>"
& "<circle cx='25' cy='10' r='"
& Radius
& "' fill='"
& ColorRed
& "' fill-opacity='"
& Opacity
& "' />"
& "<text x='15%' y='95%' text-anchor='bottom' font-family='Verdana' font-size='8px'>" & MessageText & "</text>"
& "</svg>"
VAR Complete = "data&colon;image/svg+xml;utf8,"
& "<svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='50' height='35'>"
& "<circle cx='25' cy='10' r='"
& Radius
& "' fill='"
& ColorBlue
& "' fill-opacity='"
& Opacity
& "' />"
& "<text x='15%' y='95%' text-anchor='bottom' font-family='Verdana' font-size='8px'>" & MessageTextComplete & "</text>"
& "</svg>"
VAR InProgressBehind = "data&colon;image/svg+xml;utf8,"
& "<svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='50' height='35'>"
& "<circle cx='25' cy='10' r='"
& Radius
& "' fill='"
& ColorYellow
& "' fill-opacity='"
& Opacity
& "' />"
& "<text x='15%' y='95%' text-anchor='bottom' font-family='Verdana' font-size='8px'>" & MessageText & "</text>"
& "</svg>"
VAR InProgressTracking = "data&colon;image/svg+xml;utf8,"
& "<svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='50' height='35'>"
& "<circle cx='25' cy='10' r='"
& Radius
& "' fill='"
& ColorGreen
& "' fill-opacity='"
& Opacity
& "' />"
& "<text x='15%' y='95%' text-anchor='bottom' font-family='Verdana' font-size='8px'>" & MessageTextTrack & "</text>"
& "</svg>"
RETURN
SWITCH (
TRUE (),
SUM('HR Tracking Tool'[Color Label]) =4, Complete,
SUM('HR Tracking Tool'[Color Label]) =2, InProgressBehind,
SUM('HR Tracking Tool'[Color Label]) =3, InProgressTracking,
Neutral)
 
I tried using different DAX functions such as VALUES and FORMAT but its still giving circular dependency issue.
 
I'm trying to get below output
output expected to look from KPIoutput expected to look from KPI
 
Or if there is any other better way to achieve this, I'm open to try it.
 
Can some one please help
 
0 REPLIES 0

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.