Skip to main content
Skip table of contents

How to obtain a quotient with remainder as decimals when dividing in Report Designer

You may have noticed that when dividing two numbers in Report Designer, you may occasionally get either an integer (whole number) or a real number (containing remainder as decimals) as an output.

In this article, we will further elaborate on its functionality and behavior.

In the below example, notice how the expression 10/2 would output 5 (Column A) while the expression 9/2 would output 4 and not 4.5 (Column B).

When performing numerical division with the '/' operator, you will always obtain an integer. If you would like to display the output as a real number, there are two methods to achieve it.

Method 1: Create column reference in the expression

  1. Let’s assume that column C is an existing column with a value. (In the below example, we created and added a value to column C for demonstration purposes.)

  2. Create another column (Column D) and write a division expression that uses the existing column (Column C).

Method 2: Use a formula in the expression

Write a division expression with functions (Column E).

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.