SSRS 表达式中的嵌套 IIF
Nested IIF in SSRS Expressions
嵌套 IIF 的语法是否正确?我需要使用 Switch 吗?
...
= IIF ( Fields!FUN.Value.IndexOf ("GU") OR Fields!FUN.Value.IndexOf("HA")
,IIF (Fields!JobType = "min"
,IIF(Fields!Van > 0
, IIF(Fields!Complete.Value > 80
,IIF(LOOKUP(Fields!FUN.Value,Fields!Levelseven.Value,Fields!Over.Value, "Rating")) = 3 and
LOOKUP(Fields!FUN.Value,Fields!Levelseven.Value,Fields!Over.Value, "Rating"))= 3.5
, 1000 ,0)))
...
我的理解是否正确,即所有 IIF 都必须为真才能使值为 1000?如果是:
=IIF ((Fields!FUN.Value.IndexOf ("GU") OR Fields!FUN.Value.IndexOf("HA"))
AND
Fields!JobType = "min"
AND Fields!Van > 0
AND Fields!Complete.Value > 80
AND LOOKUP(Fields!FUN.Value,Fields!Levelseven.Value,Fields!Over.Value, "Rating") = 3
AND Fields!FUN.Value,Fields!Levelseven.Value,Fields!Over.Value, "Rating" = 3.5
, 1000 ,0)
嵌套 IIF 的语法是否正确?我需要使用 Switch 吗?
...
= IIF ( Fields!FUN.Value.IndexOf ("GU") OR Fields!FUN.Value.IndexOf("HA")
,IIF (Fields!JobType = "min"
,IIF(Fields!Van > 0
, IIF(Fields!Complete.Value > 80
,IIF(LOOKUP(Fields!FUN.Value,Fields!Levelseven.Value,Fields!Over.Value, "Rating")) = 3 and
LOOKUP(Fields!FUN.Value,Fields!Levelseven.Value,Fields!Over.Value, "Rating"))= 3.5
, 1000 ,0)))
...
我的理解是否正确,即所有 IIF 都必须为真才能使值为 1000?如果是:
=IIF ((Fields!FUN.Value.IndexOf ("GU") OR Fields!FUN.Value.IndexOf("HA"))
AND
Fields!JobType = "min"
AND Fields!Van > 0
AND Fields!Complete.Value > 80
AND LOOKUP(Fields!FUN.Value,Fields!Levelseven.Value,Fields!Over.Value, "Rating") = 3
AND Fields!FUN.Value,Fields!Levelseven.Value,Fields!Over.Value, "Rating" = 3.5
, 1000 ,0)