I have a point layer of zipcode centroids with an attribute value of COVID-19 cases for each zipcode. I am currently displaying counts per zipcode as "Counts and Amounts(size)" based on the value that attribute for each record.
What I would like to do instead is symbolize by "% of total cases". Is there a way to do this without adding a field to the zipcode centroids that contains the # total cases (sum of all records)? In other words, is there a way (Arcade or otherwise) to utilize the total summed value of an attribute field in a table without using a second field that explicitly contains that total value?
Solved! Go to Solution.
Arcade FeatureSet can be used to get the information, but it is not use-able for symbol rendering. Here is an example using it in a Popup configuration.
https://www.arcgis.com/home/item.html?id=c2d3ddc1352548cbb76d29f611b86dea
var a = FeatureSetByName($datastore,"Deaths",['Deaths','Country_Region'],false)
var usa = filter(a, "Country_Region = 'US'")
var USAtotal = sum(usa,'Deaths')
return 'percentage of US Deaths '+ text(round(($feature.Deaths / USAtotal)*100,2)) +'% '+ textformatting.newline +$feature["Province_State"]+' deaths ' + text($feature.Deaths,'#,###') + ' / '+ 'US Total '+ text(USAtotal,'#,###')
Arcade FeatureSet can be used to get the information, but it is not use-able for symbol rendering. Here is an example using it in a Popup configuration.
https://www.arcgis.com/home/item.html?id=c2d3ddc1352548cbb76d29f611b86dea
var a = FeatureSetByName($datastore,"Deaths",['Deaths','Country_Region'],false)
var usa = filter(a, "Country_Region = 'US'")
var USAtotal = sum(usa,'Deaths')
return 'percentage of US Deaths '+ text(round(($feature.Deaths / USAtotal)*100,2)) +'% '+ textformatting.newline +$feature["Province_State"]+' deaths ' + text($feature.Deaths,'#,###') + ' / '+ 'US Total '+ text(USAtotal,'#,###')
Thanks Mark. Too bad that can't be used for symbolization, which would be very handy.