# 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.

![](/files/-M4GM-t7Upx4qhaMm_gd)

## 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)
```

![](/files/-M4GM-t9anj4gOyi4mY7)

You get the idea.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://colah.gitbook.io/illuminate-bi-tool-guide/jaspersoft_studio_tips_and_tricks/rounding_decimals.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
