If value = null then “ ” else value SSRS EXPRESSION issues

杀马特。学长 韩版系。学妹 提交于 2019-12-07 02:21:58

问题


value 1 is a retail price decimal value 2 is the difference between 2 retail costs both are decimals

=IIF(Fields!Prorated.Value is null,"",Fields!Prorated.Value)-Fields!Retail.Value fixxed !!!

Fixxed ^^

=IIF(IsNothing(Fields!Prorated.Value),"",(Fields!Prorated.Value-Fields!CurrentRetailPrice.Value)/Fields!Prorated.Value)

Failed ^^ this one is shown as a % difference

this has not worked what would be another way around this


回答1:


Try this:

=IIF(IsNothing(Fields!days_Prorated.Value),"",Fields!Prorated.Value-Fields!Retail.Value)

For your comment try this:

=IIF(IsNothing(Fields!Prorated.Value),"",(Fields!Prorated.Value-Fields!CurrentRetailPrice.Value)/iif(Isnothing(Fields!Prorated.Value),1,Fields!Prorated.Value)

You have to validate it twice in this case.



来源:https://stackoverflow.com/questions/32716829/if-value-null-then-else-value-ssrs-expression-issues

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!