Forum Discussion
Dynamic Range for Shapemap Legend
Hey,
I have a simple enough table, as below (not full table)
| Local_Authority | Policy Type | Count |
| Kerry County Council | Policy 1 | 1 |
| Roscommon County Council | Policy 2 | 1 |
| Sligo County Council | Policy 2 | 1 |
| Tipperary County Council | Policy 2 | 1 |
| Offaly County Council | Policy 1 | 1 |
| Kerry County Council | Policy 2 | 1 |
| Offaly County Council | Policy 1 | 1 |
| Sligo County Council | Policy 1 | 1 |
| Offaly County Council | Policy 1 | 1 |
| Cork County Council | Policy 1 | 1 |
| Fingal County Council | Policy 1 | 1 |
| Tipperary County Council | Policy 2 | 1 |
| South Dublin County Council | Policy 2 | 1 |
| Dun Laoghaire-Rathdown County Council | Policy 2 | 1 |
| South Dublin County Council | Policy 2 | 1 |
| Fingal County Council | Policy 1 | 1 |
| Fingal County Council | Policy 2 | 1 |
| Cork County Council | Policy 1 | 1 |
| Cork County Council | Policy 1 | 1 |
| Cork County Council | Policy 1 | 1 |
| Cork County Council | Policy 1 | 1 |
| Limerick City and County Council | Policy 1 | 1 |
| Cork County Council | Policy 1 | 1 |
| Kildare County Council | Policy 2 | 1 |
| Mayo County Council | Policy 2 | 1 |
This table is represented in the shapemap
What i would like to see is that when i use the Policy type column to filter the map the legend changes accordingly. So, if i change to policy 1 the location for dublin might change from range 10-20 to 1-10.
The problem as i see it is the legend only takes a category variable and these categories aren't dynamically calculated based on filter changes. A measure isn't alloweed as the legend data type.
If this isn't possible i would be open the 'overlaying' another chart on top of the map (say a treemap or something else) that would also show the legend categores changing with the filter.
As a note: A location may have multiple policy types associated with it. Ex, Dublin may have 3 rows, 2 being Policy 1, the other Policy 2.
Hope it is clear. Any help would be greatly appreciated.
2 Replies
- v-xiaosun-msftCommunity Support
Hi Anonymous ,
Could you please tell me the definition and calculation logic of your "applications range" and the relationship between it and "policy" in order that we can help you further more?
Best Regards,
Community Support Team _ xiaosunIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Hey,
The logic for the range, that i've been trying to use, is a simple Swith() or nested If statement. Something like,
Dynamic Legend =SWITCH(TRUE(),Sum(TypeCount) > 30, ">30",Sum(TypeCount) > 20 && Sum(TypeCount)<= 30, "20-30",Sum(TypeCount) > 10 && Sum(TypeCount) <= 20, "10-20",Sum(TypeCount) > 1 && Sum(TypeCount) <= 10, "1-10",Sum(TypeCount) < 1, "0")or the equivalent in an if statement. But this isn't working.