Jump to content

how to subtract variableA from variableB?


dprogrammer

Recommended Posts

Hi, I have two fields which are numeric. I have created two variables for them and converted them as double. Now I have created a third variable to do their subtraction. See example below: Say Avg1= 100 and Avg2 = null, the result should be 100, but I am getting null.

new Double ($V{Avg1} - $V{Avg2})

The result in third variable is coming up as null whereas it should be 100.  I want to check for nulls and then convert them into 0 but now sure about the formula code. Any ideas please?

 

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...