我有条件
**If charges of any week is zero then that cell has to be highlighted in red
o If charges of any week is 80% to 90% of total average then cell has to be highlighted in
lime
o If charges of any week is less than 79% of total average then it cell has to be highlighted
in light orange**
我尝试了以下条件:
IIF((SUM(Fields!ChargeAmount.Value)<>0),"Red","White",iif(sum(Fields!ChargeAmount.Value>=80% and sum(Fields!ChargeAmount.Value<=90% ,Fields!ChargeAmount.Value,"")
任何人都可以帮助我。
假设您的数据集名为“WeeklyCharges”,并且您用于按周分组的字段名为“FirstOfWeek”,请尝试以下操作:
在组的属性(FirstOfWeek)中,使用表达式定义变量FractionOfTotalAverage
=Sum(Fields!ChargeAmount.Value)
/ (Sum(Fields!ChargeAmount.Value, "WeeklyCharges")
/ CountDistinct(Fields!FirstOfWeek.Value, "WeeklyCharges"))
对于每周收费TextBox的BackgroundColor属性,请使用如下表达式:
=Switch(
Variables!FractionOfTotalAverage.Value < 0.5, "Red",
Variables!FractionOfTotalAverage.Value < 0.8, "Yellow",
Variables!FractionOfTotalAverage.Value < 0.9, "Lime")
尝试类似的东西:
IIF((SUM(Fields!ChargeAmount.Value) = 0), "Red",
IIF(SUM(Fields!ChargeAmount.Value) >= 80 and SUM(Fields!ChargeAmount.Value) <= 90, "Lime", "Orange")))