不平等的表达

时间:2015-12-18 15:51:44

标签: reporting-services equals ssrs-expression

我正在考虑使用4个表达式3表示等于1表示不等于但不计算不等于

我正在使用。

=sum(iif(Fields!NEW_SUPPLIER.Value = "Eon", 1,0) 
And (Fields!WeekDay.Value = "Monday")
And (Fields!UTILITY.Value = "Elec")
And (Fields!OLD_SUPPLIER.Value <> "Eon"))

请有人指出我正确的方向。

1 个答案:

答案 0 :(得分:0)

您需要确保所有检查都在IIf表达式的第一个参数中:

=sum
(
  iif
    (
        Fields!NEW_SUPPLIER.Value = "Eon"
            And Fields!WeekDay.Value = "Monday"
            And Fields!UTILITY.Value = "Elec"
            And Fields!OLD_SUPPLIER.Value <> "Eon"
        ,1
        ,0
    )
)