Forum Discussion
County and Numerical Labels in ArcGIS Map Visual | Power BI
- Anonymous3 years ago
Hi escarzl1
You can also create a color measure, then put the measure to the color field
e.g
Measure = SWITCH(TRUE(),SELECTEDVALUE('Table'[Country])="Pierce","Green",SELECTEDVALUE('Table'[Country])="King","Red")Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi escarzl1
The calculated column is a static value and cannot be dynamiclly changed by the filter, so you can transfer the calculated column to a measure.
MapLabels =
'Table'[County]&"
"&CALCULATE(SUM('Table'[Count of Applications]), FILTER(ALL('Table'),[Agency Name]in VALUES('Table'[Agency Name])&&[Country]=SELECTEDVALUE('Table'[County])))
Then set the measure to as a label in the map settings
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for looking into this! I tried it out but I am getting this error message:
A single value for column 'County' in table 'Table' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
It is highlighting the very first reference as the error:
MapLabels =
'Table'[County]&"
"&CALCULATE(SUM('Table'[Count of Applications]), FILTER(ALL('Table'),[Agency Name]in VALUES('Table'[Agency Name])&&[Country]=SELECTEDVALUE('Table'[County])))
I modified it by adding MAX to the 1st column reference and it fixed the Map labels themselves:
MapLabels =
MAX('Table'[County])&"
"&CALCULATE(SUM('Table'[Count of Applications]), FILTER(ALL('Table'),[Agency Name]in VALUES('Table'[Agency Name])&&[Country]=SELECTEDVALUE('Table'[County])))
Now the part that doesn't work is the color coding! Seems like no matter what, each county is now colored the same color. Not sure why the Map Labels would affect the color-coding on the map when the color coding is based on the [Count of Applications] values all by themselves. Any ideas?
- Anonymous3 years agoNot applicable
Hi escarzl1
You can also create a color measure, then put the measure to the color field
e.g
Measure = SWITCH(TRUE(),SELECTEDVALUE('Table'[Country])="Pierce","Green",SELECTEDVALUE('Table'[Country])="King","Red")Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.