Forum Discussion
ChadBrandmire
8 years agoQrew Assistant Captain
For anyone still following this... I hope this is the finished product. Note I did change some field types...
var number CFD = ToDays([Assigned Finish Date] - Today());
var number Dur = [Calc Duration];
var number PC = [% Complete] *100;
var number SD = ToDays(ToDate([Start]) - Today());
var text Red = "#f75d59";
var text Yellow = "yellow";
var text Orange = "#fda302";
If(
$SD < 0 and $CFD < 3 and $Dur <= 10 and $PC < 50, $Red,
$SD < 0 and $CFD < 3 and $Dur <= 10 and $PC < 70, $Orange,
$SD < 0 and $CFD < 3 and $Dur <= 10 and $PC < 85, $Yellow,
$SD < 0 and $CFD < 5 and $Dur <= 20 and $Dur > 11 and $PC < 50, $Red,
$SD < 0 and $CFD < 5 and $Dur <= 20 and $Dur > 11 and $PC < 70, $Orange,
$SD < 0 and $CFD < 5 and $Dur <= 20 and $Dur > 11 and $PC < 85, $Yellow,
$SD < 0 and $CFD < 10 and $Dur <= 30 and $Dur > 21 and $PC < 50, $Red,
$SD < 0 and $CFD < 10 and $Dur <= 30 and $Dur > 21 and $PC < 70, $Orange,
$SD < 0 and $CFD < 10 and $Dur <= 30 and $Dur > 21 and $PC < 85, $Yellow,
$SD < 0 and $CFD < 30 and $Dur <= 90 and $Dur > 31 and $PC < 50, $Red,
$SD < 0 and $CFD < 30 and $Dur <= 90 and $Dur > 31 and $PC < 70, $Orange,
$SD < 0 and $CFD < 30 and $Dur <= 90 and $Dur > 31 and $PC < 85, $Yellow,
$SD < 0 and $CFD < 35 and $Dur > 90 and $PC < 50, $Red,
$SD < 0 and $CFD < 35 and $Dur > 90 and $PC < 70, $Orange,
$SD < 0 and $CFD < 35 and $Dur > 90 and $PC < 85, $Yellow)
var number CFD = ToDays([Assigned Finish Date] - Today());
var number Dur = [Calc Duration];
var number PC = [% Complete] *100;
var number SD = ToDays(ToDate([Start]) - Today());
var text Red = "#f75d59";
var text Yellow = "yellow";
var text Orange = "#fda302";
If(
$SD < 0 and $CFD < 3 and $Dur <= 10 and $PC < 50, $Red,
$SD < 0 and $CFD < 3 and $Dur <= 10 and $PC < 70, $Orange,
$SD < 0 and $CFD < 3 and $Dur <= 10 and $PC < 85, $Yellow,
$SD < 0 and $CFD < 5 and $Dur <= 20 and $Dur > 11 and $PC < 50, $Red,
$SD < 0 and $CFD < 5 and $Dur <= 20 and $Dur > 11 and $PC < 70, $Orange,
$SD < 0 and $CFD < 5 and $Dur <= 20 and $Dur > 11 and $PC < 85, $Yellow,
$SD < 0 and $CFD < 10 and $Dur <= 30 and $Dur > 21 and $PC < 50, $Red,
$SD < 0 and $CFD < 10 and $Dur <= 30 and $Dur > 21 and $PC < 70, $Orange,
$SD < 0 and $CFD < 10 and $Dur <= 30 and $Dur > 21 and $PC < 85, $Yellow,
$SD < 0 and $CFD < 30 and $Dur <= 90 and $Dur > 31 and $PC < 50, $Red,
$SD < 0 and $CFD < 30 and $Dur <= 90 and $Dur > 31 and $PC < 70, $Orange,
$SD < 0 and $CFD < 30 and $Dur <= 90 and $Dur > 31 and $PC < 85, $Yellow,
$SD < 0 and $CFD < 35 and $Dur > 90 and $PC < 50, $Red,
$SD < 0 and $CFD < 35 and $Dur > 90 and $PC < 70, $Orange,
$SD < 0 and $CFD < 35 and $Dur > 90 and $PC < 85, $Yellow)