You are viewing the documentation for Blueriq 17. 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.attribute | Value | Type |
---|---|---|
Child.pocketMoney | 2.50 | Currency |
Bonus.standard | 5.00 | Percentage |
Expression | Result | Type |
---|---|---|
Child.pocketMoney - 1.00 | 1.50 | Currency |
Child.pocketMoney - 3 | -0.50 | Currency |
5.00 - 3 | 2.0000 | Number |
100 - Bonus.standard | 95.00 | Percentage |
Child.pocketMoney - Bonus.standard | Error |