SSRS嵌套的IIF语句无法正常工作

时间:2017-10-12 21:12:11

标签: reporting-services nested

在SSRS中使用嵌套IIF时遇到问题。我不知道下面的陈述有什么问题:

=iif((Fields!RM_Sieve70.Value >=0.5) And (Fields!RM_Sieve70.Value <=2) ,"lime",
iif((Fields!RM_Sieve70.Value >=0) And (Fields!RM_Sieve70.Value <0.5) , "Gold",
iif((Fields!RM_Sieve70.Value >=2) And (Fields!RM_Sieve70.Value <=3) , "Gold",
iif((Fields!RM_Sieve70.Value >3) , "Red","Black"))))

当值为1.63时它应该返回Lime,但我得到金色。请帮我弄清楚我做错了什么。

我也尝试过Switch但结果是一样的:

=SWITCH(Fields!RM_Sieve70.Value>=0.5 And Fields!RM_Sieve70.Value <=2, "lime",
Fields!RM_Sieve70.Value >=0 And Fields!RM_Sieve70.Value <0.5 , "Gold",
Fields!RM_Sieve70.Value >=2 And Fields!RM_Sieve70.Value <=3,"Gold",
Fields!RM_Sieve70.Value >3 ,"Red")

0 个答案:

没有答案