Division Calculations Not Showing Remainder

I am constructing a simple calculated field in v10.1.400.14.

The calculation is this: (1 / 2)

The result of that calculation is this: 0

Converting all fields from data type “int” to data type “decimal” changes the result to: 0.00

I am expecting the answer to be: 0.50 (as a remainder)

What am I doing incorrectly here?

For those interested, I have figured out that both the numerator and denominator apparently need to be in a decimal format before you perform the division calculation.

Therefore, if you are performing a division calculation among a calculated numerator and a calculated denominator, your format should be:

Format(((convert(decimal, varNumerator) / convert(decimal, varDenominator)) * 100), '0.00')

If your result needs to be shown as a percentage and you need to show the “%” symbol at the end of your calculation – then simply change the data type of your percent calculated field to “nvarchar” and add the following to the end of your calculation statement:

+ '%'

3 Likes