cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
rohan_mate Visitor
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.JPGoutput 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
 

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Kudoed Authors (Last 30 Days)