I'd really appreciate some help with this.
My organization is creating a web experience for a client using religious census data to map counts and percentages of Christians, non-religious people, and other religions across the country. We are filtering these by map extent, where the dynamic text updates as the client scrolls and zooms on the map.
The "Engaged Christians" variable is our own calculation, attached to a point-based layer (churches layer), and the next three variables are based on census districts, in a polygon layer. I currently have it set to where the individual counts (column 2) are functioning correctly, and they are filtering well by extent. I am having trouble with the percentage column (column 3), however, where they don't always add up to 100% or they go above 100%. For example, below adds up to just over 101%.
The reason for this is because the dynamic text in the percentage column is being calculated from the population data I have access to (within the polygon layer). I think this is why there is a discrepancy.
My question is: How can I instead calculate these percentages by the total sum of column 2? Is there a way to pull that data directly from column 2's dynamic text? I want to make sure it always adds perfectly to 100% while still filtering properly by extent.
My goal is to do (Total Christian / Sum of column 2 counts)*100 instead of (Total Christian / Pop.)*100 which clearly yields the wrong % values. Or, maybe there's a way to restrict my expressions so that they only allow it to reach 100%?
Thanks in advance for the help! I appreciate it a lot.