Hello,
I am looking to produce a map that dynamically displays calculated fields. The following fictional example represents what I am trying to achieve, where each row is a postal code, the columns show the number of people in each occupation for that postal code, and the calculated fields return the top three occupations in that postal code (the name of the column, not the number):
Postal Code | Chef | Farmer | Doctor | Teacher | Sailor | Engineer | Most Common | Second Most C. | Third Most C. |
A0A B1B | 0 | 3 | 1 | 8 | 20 | 2 | Sailor | Teacher | Farmer |
A0A B1C | 23 | 19 | 4 | 14 | 25 | 8 | Sailor | Chef | Farmer |
A0A B1D | 6 | 23 | 18 | 4 | 3 | 12 | Farmer | Doctor | Engineer |
A0A C1A | 35 | 5 | 3 | 16 | 4 | 17 | Chef | Engineer | Teacher |
A0A C1B | 10 | 45 | 6 | 12 | 1 | 1 | Farmer | Teacher | Chef |
A0A C1C | 13 | 31 | 8 | 20 | 32 | 6 | Sailor | Farmer | Chef |
If I zoom into the map, I should be able to see the label I created showing the three calculated fields, demonstrating the top three occupations in each postal code. If I zoom out further, I want the postal codes to merge together, and display new calculated values that represent the 'new grouped areas' as represented in the table below:
Postal Code | Chef | Farmer | Doctor | Teacher | Sailor | Engineer | Most Common | Second Most C. | Third Most C. |
A0A B** | 29 | 45 | 23 | 26 | 48 | 22 | Sailor | Farmer | Chef |
A0A C** | 58 | 81 | 17 | 48 | 37 | 24 | Farmer | Chef | Teacher |
How do I achieve this dynamic label? How should I setup the calculated field to make this possible?
Thanks,
Alex
Perhaps the easiest way to do this is to have 2 layers in the Map View. The first layer is the one with all the zipcode polygons. The second layer in the Map View is the merged A0AB** polygons and the A0AC** polygons layer. Using scale dependecies for each layer - help documentation here - the first layer visibility turns on at say 1:12000 and lower (1:1000 for example) while the second layer turns off. When the user zooms out beyond 1:12000, the first layer turns off and the second layer turns on. You can set the label for each layer to display those fields of interest. Let me know if you have additional questions and I'd be happy to assist.