I think what I'm trying to do is fundamentally not possible, but I thought I'd ask here in case there's something I'm missing.
Basically, I created an app in Experience Builder to let users select some census tracts, then see a bunch of aggregated demographic data about those tracts. Ideally, users could then print out these results, which is where Pro and specifically reports come into the picture (I'd love to just use the print functionality that comes with the Near Me widget in ArcGIS Online, as that does EXACTLY what I need it to do, but unfortunately this app is in Enterprise 11.3).
The issue I've run into is that no matter what I do, all of the report values that I can generate are inherently based on individual features. I can sum a field, but if I want to work with an entire selection and make other calculations, I can't seem to do that. I think the Arcade layout profile documentation might confirm this, but my brain is mush.
For example, I'm trying to use the ACS Population Variables layer to show the user what percentage of the population is under 5 years old. This is really easy in Experience Builder. Connect the data, point to the selection, and calculate:
((SUM({Males Under 5 Years})+SUM({Females Under 5 Years}))/SUM({Total Population}))*100
However, in Pro, I can only do this feature by feature, which doesn't lead to the percentage for the whole selection being accurate. For example, say I had the following data, where all the columns exist in the data except column D :
Tract | A: Total Population | B: Males Under 5 | C: Females Under 5 | D : % Under 5 (B+C)/A*100 |
1 | 6047 | 248 | 144 | 6.5 |
2 | 5761 | 104 | 73 | 3.1 |
3 | 6138 | 0 | 0 | 0 |
4 | 1766 | 14 | 18 | 1.8 |
I can calculate column D for each tract, but I can't seem to calculate the actual percentage across the selection. The best I can do is provide the mean of column D, which is 2.9%, instead of the real percentage, which is 3.2%.
There are other options, like getting the median, but really I just want the actual percentage. Is this possible, somehow?