You are viewing the documentation for Blueriq 15. Documentation for other versions is available in our documentation directory.

SUBTRACT (-)


Use the '-' (minus) sign to subtract values of some type of number.


Syntax

 number1 - number2 - ...


Inputs

  • number1 - Number or attribute of some type of number to subtract other number values from.

  • number2 - Number or attribute of some type of number to subtract.


Return types

  • number - number = number

  • integer - integer = integer

  • currency - currency = currency

  • percentage - percentage = percentage

  • number - integer = number

  • number - currency = currency

  • number - percentage = percentage

  • integer - number = number

  • integer - currency = currency

  • integer - percentage = percentage

  • currency - number = currency

  • currency - integer = currency

  • percentage - number = percentage

  • percentage - integer = percentage

  • currency - percentage = error
  • percentage - currency = error


Examples

Suppose the following data model.

Entity.attributeValueType
Child.pocketMoney2.50Currency
Bonus.standard5.00Percentage
ExpressionResultType
Child.pocketMoney - 1.001.50Currency
Child.pocketMoney - 3-0.50Currency
5.00 - 32.0000Number
100 - Bonus.standard95.00Percentage
Child.pocketMoney - Bonus.standardError