Select to view content in your preferred language

Calc percentage in Operations Dashboard?

12026
8
10-25-2013 05:02 AM
AndrewHargreaves
Deactivated User
Anyone know how to a "Field Calc" in Op's Dash?
I have a filter on a Feature Service that pulls out inspections within last 30 days.
I have another filter that pulls out inspections containing the term ???inoperable???.
Within Ops Dash how do I perform some kind of calculation between the two to get a % of inspections recorded as inoperable?

Thanks
8 Replies
TifPun
by
Frequent Contributor
Hi Andrew,

The out-of-the-box app doesn't provide this functionality. The closest way to do it is to create 2 filters for your Inspection layer in the map/external data source config window (one for inspections with date within the last 30 days and one for inspections with names containing "inoperable"). Then you can add 2 summary widgets to the view, one showing the feature count using the "date within last 30 days " data source and one showing the count using the "name contains inoperable" data source. It is not a perfect solution, but should help you get a rough idea.

And another way to do it is to write a custom widget that takes the 2 data sources above and then do the calculation, It should be quite simple.

Thanks

Tif
0 Kudos
PhilipQueen
Frequent Contributor

This question is from 2013, so you probably don't still need help, but it's the first to come up on Google when you search for this so I figure it will help someone. 

You can show percentage in an indicator by setting your numerator - in this case inoperable inspections - to your value field, and your denominator - in this case all inspections - to your reference field.

Then in your text boxes, you can display the percent by clicking "Fields: {}" and choosing 100 * Value / Reference - {percentage}. There's more information on this at Indicator—Operations Dashboard for ArcGIS | ArcGIS, including an explanation of all the other calculations that you can use within an indicator. Your percentages may show up with a lot of decimals, and you can format those by following this help: Format numbers—Operations Dashboard for ArcGIS | ArcGIS.

I hope this can help someone else who was looking for this functionality!

Andrew HargreavesTif Pun#ops dashboard#operationsdashboard#percent#indicator widget

DarrylKlassen1
Frequent Contributor

Hi Philip Queen,

Do you know if there is a way to add the value and reference together? 

i.e. {value + reference} 

I am trying this, but it doesn't appear to be an option.

Thanks

Darryl

PhilipQueen
Frequent Contributor

Hey Darryl,

You're right, it isn't an option. I tried some likely candidates like {sum} to see if there was something hidden, but with no luck. I don't even see adding calculations as an "Idea" - but I think it's a good candidate for one, as this seems like a real limitation.

Sorry I couldn't be of more help,

Philip

DarrylKlassen1
Frequent Contributor

Thanks.  Perhaps I will add it as an ArcGIS Idea.

DuaneTreadon
Regular Contributor

Old Post, I know.  Came across it as I was searching for a way to add the value and reference together.  Since  you can do difference you'd think sum would be also an option.  Only way I've figured it out was to add a new field that did the calculation and then use that field in my dashboard 99 indicator.

Kevin_Thompson
Occasional Contributor

Hello All,

I found this post and figured it out!

ESRI should really update the user guides on this to specifically mention that you must turn on a Reference and select Statistics for it to show up in the Fields {} of the Indicator. Pictures would be helpful as this feature is all hidden and I will be training people at work for decades on this lol.

In 2021 there are two options here that I know of:

1) Ensure that a Reference for the indicator has been set

KevinThompson1_1-1617242909527.png

Then the options to do the calculations show up

KevinThompson1_2-1617242996274.png

https://doc.arcgis.com/en/dashboards/get-started/indicator.htm

KevinThompson1_3-1617243041128.png

 

2) Use the Dashboards Beta and Arcade to do this manually or follow the instructions above as the beta too supports the original method.

Here is some sample code:

var percentCount = Floor($datapoint.count / $reference.count * 100)
var yardCount = $datapoint.count
return {
//textColor:'',
//backgroundColor:'',
topText: 'Caledon',
topTextColor: '',
topTextOutlineColor: '',
topTextMaxSize: 'large',
middleText: concatenate(yardCount, ' or ', percentCount, '%'),
middleTextColor: '',
middleTextOutlineColor: '',
middleTextMaxSize: 'medium',
//bottomText: '',
//bottomTextColor: '',
//bottomTextOutlineColor: '',
//bottomTextMaxSize: 'medium',
//iconName:'',
//iconAlign:'left',
//iconColor:'',
//iconOutlineColor:'',
//noValue:false,
//attributes: {
// attribute1: '',
// attribute2: ''
// }
}

 

Michael_Kraus
Regular Contributor

I have been told this was not possible by my local ESRI distributor and they suggested a full custom app would be required to divide two numbers and display the result in a widget.  Thank you @Kevin_Thompson for giving me the free out of the box solution.