我有百分比计算字段,它必须根据值具有不同的颜色:
- 其中 <70% 为红色
- 70% 到 79.9% 是黄色
- 80%+ 为绿色
我试过:
=Switch((Sum(Fields!TotalQtySUM.Value, "DataSet1")/Sum(Fields!REG_HOURS.Value, "DataSet1")) < 0.7, "Red" ,
(Sum(Fields!TotalQtySUM.Value, "DataSet1")/Sum(Fields!REG_HOURS.Value, "DataSet1")) < 0.8, "Black",
(Sum(Fields!TotalQtySUM.Value, "DataSet1")/Sum(Fields!REG_HOURS.Value, "DataSet1")) >= 1, "Green")
和:
=IIF((Sum(Fields!TotalQtySUM.Value, "DataSet1")/Sum(Fields!REG_HOURS.Value, "DataSet1")) < 0.7, "Red" ,"Green")
他们要么全红,要么随意改变颜色,不遵守任何规则我哪里出错了?