Select to view content in your preferred language

Let us format numbers in ArcGIS Dashboards — nobody wants/needs full precision

419
10
Jump to solution
2 weeks ago
RobbieKieffer
Emerging Contributor

Can we please get basic number-formatting controls in ArcGIS Dashboard tables?  It's available in maps popups.  (Or, if it's there, where is it?)

Right now, any numeric field in a table or indicator just dumps its full stored precision — often 10+ decimal places — with no way to round, limit, or even cleanly display whole numbers. The result is unreadable tables and indicators like: 195.399999999998.

I'm all for maintaining the precision where it's needed (at the data processing level).  Dashboards are often public-facing and no person in the public that is viewing dashboards needs to see (or even cares to) know that the database stores 135.3999999998, when for the public, 135.4 is more than adequate.

It would be great to have "number format" options in Dashboard tables and indicators, much like the ones available in generating popups for Maps.  Could be as simple as:
- Number of decimal places
- Round or truncate
- Show or hide trailing zeros
- Thousands separator toggle

If it's already there and hiding somewhere, could someone point me to where it is?

0 Kudos
1 Solution

Accepted Solutions
Neal_t_k
Frequent Contributor

what about this:

Text($feature.fieldname, '#,###.00')

 so:   Text($datapoint.Hold 1, '#.##.00')

 

 https://support.esri.com/en-us/knowledge-base/how-to-retain-trailing-zeros-after-the-decimal-point-i...

View solution in original post

0 Kudos
10 Replies
Neal_t_k
Frequent Contributor

If you format the fields  for  those in a map or a  feature layer, they should follow through to the dashboard.

Neal_t_k_1-1762977535547.png

 

Edit,  be sure to save the layer

Neal_t_k_0-1762977434162.png

 

0 Kudos
NairiSevajian
Esri Community Manager

Hi @RobbieKieffer, you should be able to set the number of decimal places, add/remove the thousands separator, and more in the Formatting Settings for the table and indicator elements. This doc outlines the other elements that have this ability as well. What formatting options are currently not in the product that you would like to see?

0 Kudos
RobbieKieffer
Emerging Contributor

Hi @NairiSevajian Here's what I've got:  This is a sample of part of the table.

SampleTableRow.png

For instance, I want "Hold 1" to be two decimal places.  When I'm in the Table settings in the Dashboard editor, and I go to "Values", the only formatting choices I see are these:

FormattingOptions.png

Am I not in the right spot?  I've looked through all of the left-side tabs in the Table settings window and can't find it.  The data for the table is coming from a hosted feature layer directly.  

@Neal_t_k I'm pulling data directly from a feature layer, so not sure how to change it there.  I was going to add some new fields to the feature layer (and calculate them to drop all but two decimal places.  Unfortunately, that feature layer is also part of a join, and from what I can tell, you can't add fields to a table that is feeding a join.  In my map view (which uses different data sources), the popups are configurable as you suggest.  I've got them successfully trimmed to two places.  It's just the table I can't adjust.

Edit: To clarify, this is a "feature" table type, not grouped, because I didn't want the entire table, just some of the fields

0 Kudos
Neal_t_k
Frequent Contributor

@RobbieKieffer In AGOL open the feature layer in a map. -> on the properties of the feature layer. In the properties menu there should be a item called fields:

Neal_t_k_0-1762985259790.png

Then click on the field you want to change.  If it is a decimal field you should get a popup like this where you can adjust the number of sig digits etc.:

Neal_t_k_1-1762985393184.png

Once you are done, go to the that layer, click the three dot menu and save.

Neal_t_k_2-1762985526927.png

It should follow through to your dashboard.

It appears @NairiSevajian suggest solution is only for aggregates performed in dashboards.

 

You can also use the advance formatting option in dashboards to achieve this.  In the values tab select advanced formatting and use the Round() function to only return 2 decimal places:

Neal_t_k_3-1762985829951.png

edit: add link

https://developers.arcgis.com/documentation/app-builders/no-code/arcgis-dashboards/calculate-and-for....

 

 

0 Kudos
NairiSevajian
Esri Community Manager

@RobbieKieffer I see. You could enable Advanced Formatting from the Value options and modify the display text using Arcade. For example:

displayText : Text($datapoint.Hold 1, '#.##'),

I used this Support article as a reference. 

0 Kudos
RobbieKieffer
Emerging Contributor

Thanks @NairiSevajian .  As soon as I clicked advanced formatting, it dropped all the decimals. 

RobbieKieffer_0-1763394377427.png

I then added the '#.##' to "HoldMeas1" (Hold 1 is just a display alias) and it stays at 200 (for the first row).  I'm after it showing 200.00.  Is there a way to "force" the trailing zeros?

0 Kudos
Neal_t_k
Frequent Contributor

I think the Round() function will keep trailing zeros? see my post above.

0 Kudos
RobbieKieffer
Emerging Contributor

@Neal_t_k I tried the Round() and it doesn't keep the trailing zeros... basically nothing changed for the image in my previous post.

0 Kudos
Neal_t_k
Frequent Contributor

what about this:

Text($feature.fieldname, '#,###.00')

 so:   Text($datapoint.Hold 1, '#.##.00')

 

 https://support.esri.com/en-us/knowledge-base/how-to-retain-trailing-zeros-after-the-decimal-point-i...

0 Kudos