开发者

SSRS 2008 IIF Multi condition syntax

开发者 https://www.devze.com 2023-03-25 22:48 出处:网络
So far I have the following expression that works correctly: *SUM(IIF(Fields!operation_type.Value=\"Motor\",0,Fields!NbPi开发者_C百科eces_ref.Value))*

So far I have the following expression that works correctly: *SUM(IIF(Fields!operation_type.Value="Motor",0,Fields!NbPi开发者_C百科eces_ref.Value))*

however, How is the syntax if I want to add more conditions ? On top of *Fields!operation_type.Value="Motor"* another condition would be *Fields!operation_type.Value="Break"*

thanks a lot


Try the SWITCH function. It'll return the value of the first condition satisfied.

=SWITCH(Fields!operation_type.Value = "Motor", 0, Fields!operation_type.Value = "Break", 3)

Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号