SSRS 2008,我正在尝试根据以下内容格式化单元格的颜色,但结果格式不能为字段生成正确的颜色,任何人都可以帮忙吗?
期望的输出:
录取< 90%红色> 90%绿色
非入场< 95%红色> 95%绿色
=IIf (SUM(IIF(Fields!WEEKS_BANDING.Value = "< value" and fields!Flag.Value = "Non-Admitted",1,0)) / count (Fields!id.Value) < .95 , "Red" ,
IIf (SUM(IIF(Fields!WEEKS_BANDING.Value = "< value" and fields!Flag.Value = "Non-Admitted" ,1,0)) / count (Fields!id.Value) >= .95 , "LimeGreen" ,
IIf (SUM(IIF(Fields!WEEKS_BANDING.Value = "< value" and fields!Flag.Value = "Admitted" ,1,0)) / count (Fields!id.Value) < .90 , "Red" ,
IIf (SUM(IIF(Fields!WEEKS_BANDING.Value = "< value" and fields!Flag.Value = "Admitted" ,1,0)) / count (Fields!.Value) >= .90 , "LimeGreen" , "Transparent"))))
答案 0 :(得分:0)
我已经通过调整下面的代码找到了成功,现在已经解决了着色问题,非常感谢您的帮助。
=IIf (fields!Flag.Value = "Non-Admitted" and (SUM(IIF(Fields!WEEKS_BANDING.Value = "< value" ,1,0)) / count (Fields!id.Value) < .95) , "Red" ,
IIf (fields!Flag.Value = "Non-Admitted" and (SUM(IIF(Fields!WEEKS_BANDING.Value = "< value" ,1,0)) / count (Fields!id.Value) >= .95) , "LimeGreen" ,
IIf (fields!Flag.Value = "Admitted" and (SUM(IIF(Fields!WEEKS_BANDING.Value = "< value" ,1,0)) / count (Fields!id.Value) < .90) , "Red" ,
IIf (fields!Flag.Value = "Admitted" and (SUM(IIF(Fields!WEEKS_BANDING.Value = "< value" ,1,0)) / count (Fields!id.Value) >= .90) , "LimeGreen" , "Transparent"))))