Display ratio between two fields in dashboard widget

301
4
Jump to solution
11-25-2020 07:39 PM
New Contributor III

Hi I have a survey that outputs in this type of format

workersearchhoursbirdfound
AN1Y
CP0.2Y
AN0.5 
AN0.75Y
JO0.6 
PR0.1Y
LK0.3Y
LK0.6Y
CP0.4 
CP0.5Y
JO0.25 
PR0.7 
JO0.15Y
PR0.35Y

 

I would like to create a Dashboard widget/chart to display the number of times bird found per hour worked, by using formula 'count of birdfound'/'sum of workhours'.

Is it possible to get a calculated value in any of the dashboard chart options from two fields, one a count and the other a sum? This page on indicators seem to suggest that its possible to do a simple calculation for a ratio value at least in the indicator widget, but I'm unsure how to place a count or sum of a field into the 'Reference' section (as displayed in the description|formula table).

Thanks!

 

edit: found relevant instructions - 3. Normalise your metric, Step 2. onwards

Reply
0 Kudos
1 Solution

Accepted Solutions
Esri Contributor

Hi @JulietK ,

You are most welcome. 

If you want to display the final calculated value you cannot do that within the Indicator widget.

Theoretically speaking you could do is add a new field in your feature service and use Attribute expression in Web Map to perform the calculations and then you can use that field to display the value in dashboard, limit the results to be displayed to 1 so it displays only one single value.

Cheers,
Manish

View solution in original post

Reply
0 Kudos
4 Replies
Esri Contributor

Hi @JulietK ,

You can do this by using the Indicator widget and when configuring the widget, you can select the field from birdcount and set filter to include values with 'Y' so it will provide you the count of the records. and for the reference value you can then set as statistic and select Sum for the workhours and additionally you may set the same filter to sum only the records with 'Y'. 

 

Please refer to the below screenshot for an example. You can modified it further to your requirements.

 

ManishPatel_0-1606363092356.png

 

Hope this helps.

 

Cheers,
Manish
Reply
0 Kudos
New Contributor III

Hi Manish, 

Thank you for that, the screenshot is very helpful! Just wondering if there's any way to get the final calculated value to display? e.g. in the example, have value 0.009 displayed (3/330=0.009).

Reply
0 Kudos
Esri Contributor

Hi @JulietK ,

You are most welcome. 

If you want to display the final calculated value you cannot do that within the Indicator widget.

Theoretically speaking you could do is add a new field in your feature service and use Attribute expression in Web Map to perform the calculations and then you can use that field to display the value in dashboard, limit the results to be displayed to 1 so it displays only one single value.

Cheers,
Manish

View solution in original post

Reply
0 Kudos
New Contributor III

FYI for anyone else wanting to show final calculated value from {value} and {reference} - I found a solution shown here under 3. Normalise your metric - Step 2 onwards, which adds on a bit further to Manish's example 🙂