vendredi 27 février 2015

Combining two column conditions in calculated column



I have a task list which has color coding for Progress Bar and Task Status based on % Complete and Status column values. I have one more additional condition for: IF status=Blocked then whatever the % Complete value may be the Progress Bar background color should be Red.


I have following formula for Progress Bar:



="<DIV style='display:inline-block;position:relative; width:60px; height:17.5px;border:1px solid;'><DIV style='background-color:"&CHOOSE(INT([% Complete]*10)+1,"red","red","OrangeRed","OrangeRed","DarkOrange","Orange","Gold","yellow","GreenYellow","LawnGreen","Lime")&"; width:"&([% Complete]*100)&"%;'>&nbsp;</DIV><DIV style='position:absolute; top:0px;'>"&TEXT([% Complete],"0%")&"</DIV></DIV>"


Task Status:



="<span style=""font-weight:bold;color:"&IF(Status="Blocked","red",IF(Status="Completed","limegreen",IF(Status="In Progress","gold",IF(Status="Not Started","lightblue","lightslategray"))))&""">"&Status&"</span>"


Tried combining both unsuccessfully:



="<DIV style='display:inline-block;position:relative; width:60px; height:17.5px;border:1px solid;'><DIV style='background-color:"&IF(Status="Blocked","red","&CHOOSE(INT([% Complete]*10)+1,"red","red","OrangeRed","OrangeRed","DarkOrange","Orange","Gold","yellow","GreenYellow","LawnGreen","Lime")&"; width:"&([% Complete]*100)&"%;'>&nbsp;</DIV><DIV style='position:absolute; top:0px;'>"&TEXT([% Complete],"0%")&"</DIV></DIV>"


Any pointers to solve this issue? enter image description here








0 commentaires:

Enregistrer un commentaire