Rounding Decimals

You'll need to take a different approach depending on where in your report you'd like to round.

Rounding in Text Field

  • Select your text field

  • Go to Properties > Text Field > Pattern

  • Click the pencil icon

  • Select Number

  • Select the first option in the list of number formats

  • Adjust the number of "#"s in the Pattern field to control how many decimals to display in your text field.

Rounding in a Chart Data Label

To round your data labels:

  • Double-click on your chart to open the Chart Wizard

  • First, you’ll want to copy the expression in the value field on the left.

  • Next, locate the label field on the right, and click the 3 dots to the right of the field to open the expression editor.

  • Enter the following expression:

new DecimalFormat("#,###.#").format(paste the expression from your value field)

This command will format your decimal number. The command above tells JSS to round your number to 1 decimal place (and insert a comma if your number is 1,000+).

If you don’t want to show any decimals, enter this:

new DecimalFormat("#,###").format(paste the expression from your value field)

If you want to display two decimals, enter this:

new DecimalFormat("#,###.##").format(paste the expression from your value field)

You get the idea.

Last updated