13

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

Pedram
  • 6,256
  • 10
  • 65
  • 87
Cladback
  • 157
  • 1
  • 1
  • 9
  • 1
    You'll find you get better answers if instead of "this has not worked" you describe what you expect to happen, what happened instead, and any error messages you're seeing. Also, what value do you actually want if Prorated is null? (Hint: "" is not a number) – Matt Gibson Sep 22 '15 at 12:29
  • @MattGibson what i expect to happen is to show blank if prorated = null (Hint: i am a BI report dev, i dont decide on what is wanted i just give them what they want) – Cladback Sep 22 '15 at 12:42
  • by blank i mean "" exactly how the question was asked – Cladback Sep 22 '15 at 12:43

1 Answers1

23

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.

alejandro zuleta
  • 13,962
  • 3
  • 28
  • 48
  • it worked for my first column but for my second it didnt =IIF(IsNothing(Fields!Prorated.Value),"",(Fields!Prorated.Value-Fields!CurrentRetailPrice.Value)/Fields!Prorated.Value) – Cladback Sep 22 '15 at 12:34