尝试使用嵌套的IIF获得最大的结果

时间:2017-04-13 16:43:54

标签: sql reporting-services

我试图使用嵌套的IIF语句获得3个数字的最大结果。到目前为止,我一直在说它期待结束声明。谢谢你的帮助!

IIF((IIF(Fields!Sold4Day.Value<Fields!Sold1Day.Value,Fields!Sold1Day.Value, Fields!Sold4Day.Value))<Fields!OnOrder1Day.Value,Fields!OnOrder1Day.Value)

1 个答案:

答案 0 :(得分:0)

我发现了自己的错误。错过了外部IIF的错误部分

IIF((IIF(Fields!Sold4Day.Value<Fields!Sold1Day.Value, Fields!Sold1Day.Value, Fields!Sold4Day.Value))<Fields!OnOrder1Day.Value,Fields!OnOrder1Day.Value,(IIF(Fields!Sold4Day.Value<Fields!Sold1Day.Value, Fields!Sold1Day.Value, Fields!Sold4Day.Value)))