Summary
A set of data consists of numerous values consolidated in a layer's attribute table. Where applicable and necessary, values are recorded with decimal numbers to ensure data precision. Projecting a rounded value in a dashboard indicator may be required in some cases for data management purposes.
This article provides the workflows to round values to zero decimal places in the ArcGIS Dashboards indicator by configuring the Maximum decimal place setting or using Arcade expressions.
The image below shows the value with decimal numbers projected on the indicator element.
Procedure
Depending on the circumstances, apply either of the workflow options provided below to round values in the indicator element.
Configure the 'Maximum decimal places' setting
- In ArcGIS Dashboards, click Create dashboard, fill in the required sections, and click Create dashboard in the lower-right corner.
- On the dashboard toolbar, click Add element and select Indicator.
- In the Select a layer window, click Browse all layers and select the desired layer.
- In the Indicator configuration window, configure the settings. Refer to ArcGIS Dashboards: Configure an element for more information.
- Set the Maximum decimal places setting.
- In the Indicator window, on the Indicator tab click Value formatting to expand.
- Under Maximum decimal places, specify '0'.
- Click Done.
- On the dashboard toolbar, click Save > Save to save the changes.
Use Arcade expressions
- In ArcGIS Dashboards, click Create dashboard, fill in the required sections, and click Create dashboard in the lower-right corner.
- On the dashboard toolbar, click Add element and select Indicator.
- In the Select a layer window, click Browse all layers and select the desired layer.
- In the Indicator configuration window, configure the settings. Refer to ArcGIS Dashboards: Configure an element for more information.
- On the Indicator tab, in the Advanced formatting setting, click Enable. Refer to ArcGIS Dashboards: Enable advanced formatting in an indicator for more information.
- Use the Round function to round off decimals to the nearest value. In the Advanced formatting window, locate the data point attribute intended to be rounded off. Copy and paste the following Arcade expression into the line where the intended value to be rounded off is located. Replace <Text position> with the original text position property and <$datapoint.field> with the feature and field intended to be rounded off.
<Text position>: Round(<$datapoint.field>, 0)
The image below shows the original and edited Arcade expressions in the Advanced formatting window.
Note:
Alternatively, use the Ceil function in the expression to return the input value rounded upwards to the given number of decimal places.
- Click Done.
- On the dashboard toolbar, click Save > Save to save the changes.
The image below shows the round value projected on the indicator element.