Hi I have a survey that outputs in this type of format
worker | searchhours | birdfound |
AN | 1 | Y |
CP | 0.2 | Y |
AN | 0.5 | |
AN | 0.75 | Y |
JO | 0.6 | |
PR | 0.1 | Y |
LK | 0.3 | Y |
LK | 0.6 | Y |
CP | 0.4 | |
CP | 0.5 | Y |
JO | 0.25 | |
PR | 0.7 | |
JO | 0.15 | Y |
PR | 0.35 | Y |
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
Solved! Go to Solution.
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.
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.
Hope this helps.
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).
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.
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 🙂
THANK YOU!!!! I've been looking for a solution to this for days