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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.