Forum Discussion
beatrizcorrea
2 years agoNew Member
DAX Conditional Formatting - Multiple Conditions traffic lights - PBI
I need to do conditional formatting where I will use semaphores. If the service level is greater than the target value, the traffic light will turn green, If the service level is less than the target...
- 2 years ago
I found the solution, it is:
FarolKPI =VAR target = SELECTEDVALUE(DimService[Target])VAR cor =IF({_FactService_Measures[ServiceLevel]} >= target, "Green",IF({_FactService_Measures[ServiceLevel]} < target && {_FactService_Measures[ServiceLevel]} <= 0.5, "Red", "Yellow"))VAR icone = "data:image/svg+xml;utf8," &"<svgxmlns='http://www.w3.org/2000/svg' viewBox='0 0 130 130'><circle cx='60' cy='60' r='55'fill='" & cor & "' /></svg>"RETURN icone
beatrizcorrea
2 years agoNew Member
I found the solution, it is:
FarolKPI =
VAR target = SELECTEDVALUE(DimService[Target])
VAR cor =
IF({_FactService_Measures[ServiceLevel]} >= target, "Green",
IF({_FactService_Measures[ServiceLevel]} < target && {_FactService_Measures[ServiceLevel]} <= 0.5, "Red", "Yellow"))
VAR icone = "data:image/svg+xml;utf8," &
"<svg
xmlns='http://www.w3.org/2000/svg' viewBox='0 0 130 130'>
<circle cx='60' cy='60' r='55'
fill='" & cor & "' />
</svg>"
RETURN icone
- Anonymous2 years agoNot applicable
Hi beatrizcorrea ,
I am glad you have solved the problem, please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Wisdom Wu