我在SSRS 2008中做了一个向下钻取报告,其中有一个父组和四个子组,每个组字段的合计值位于透视列下。如果特定的聚合,我必须进行条件格式化来更改透视字段的背景色值超过每个向下钻取字段上的输入值。
我尝试使用“ IIF”和“ SWITCH”条件进行多个表达式来更改每个向下钻取字段中枢轴字段的背景颜色。
=switch(
Fields!CIRCLE.Value,"DataSet1" AND (fields!TOTAL.Value>30000,"DataSet1"),"Red",
(Fields!ZONE.Value,"DataSet1" AND (fields!TOTAL.Value>100,"DataSet1"),"Red",
(Fields!CLUSTER.Value,"DataSet1" AND (fields!TOTAL.Value>5000,"DataSet1"),"Red",
(Fields!NODE.Value,"DataSet1" AND (fields!TOTAL.Value>3000,"DataSet1"),"Red","White"
))))
我希望以枢轴为总和的“小时”字段在圆级区域级别,集群级别和节点级别上变为红色,例如,如果枢轴列下的“总和”字段在第3小时为700,并且超过300,则在第3个值小时应该在圆圈水平上变成红色。
答案 0 :(得分:1)
尝试此方法:
=switch( Fields!CIRCLE.Value > 30000 AND Fields!TOTAL.Value >30000,"Red",
Fields!ZONE.Value> 100 AND Fields!TOTAL.Value > 100,"Red",
Fields!CLUSTER.Value > 5000 AND Fields!TOTAL.Value > 5000,"Red",
Fields!NODE.Value > 3000 AND Fields!TOTAL.Value > 3000 ,"Red")
答案 1 :(得分:1)
答案 2 :(得分:1)
@ SuperSimmer44下面是去往输出的链接图像- Drilldown Report sample方案:圆形> 4000(红色),区域> 3000(红色),群集> 500(红色)
答案 3 :(得分:0)
尝试此方法(您需要将小时值扩展到10 +):
=switch(Fields!HOUR1.Value = "1" and Fields!TOTAL.Value >= "100", "RED",
Fields!HOUR1.Value = "2" and Fields!TOTAL.Value >= "200", "RED",
Fields!HOUR1.Value = "3" and Fields!TOTAL.Value >= "300", "RED",
Fields!HOUR1.Value = "4" and Fields!TOTAL.Value >= "400", "RED",
Fields!HOUR1.Value = "5" and Fields!TOTAL.Value >= "500", "RED",
Fields!HOUR1.Value = "6" and Fields!TOTAL.Value >= "600", "RED",
Fields!HOUR1.Value = "7" and Fields!TOTAL.Value >= "700", "RED",
Fields!HOUR1.Value = "8" and Fields!TOTAL.Value >= "800", "RED",
Fields!HOUR1.Value = "9" and Fields!TOTAL.Value >= "900", "RED",
)