If value = null then " " else value SSRS EXPRESSION issues

69,111

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.

Share:
69,111
Cladback
Author by

Cladback

Updated on December 03, 2020

Comments

  • Cladback
    Cladback over 3 years

    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

  • Cladback
    Cladback over 8 years
    it worked for my first column but for my second it didnt =IIF(IsNothing(Fields!Prorated.Value),"",(Fields!Prorated.Va‌​lue-Fields!CurrentRe‌​tailPrice.Value)/Fie‌​lds!Prorated.Value)