Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
f_r_1998
Helper I
Helper I

Coloring coding in a measure for Map

Hello everyone,

 

I have been working on a PowerBi dashboard with finctional sales data of pharma companies between 2017 and 2020 for a Uni Project. I have created already quite some visuals and working now on a map. For this I want to color the geographical dots green and red based on a measure and tried therefore to create a new measure for the color. However, when I put "green", the dots appear blue. I have tried to use color code like "#2FF383" but it just appears in grey. Conditional formatting on the field directly is not possible for this visual, so it has to be through an extra measure.

 

f_r_1998_0-1737205083662.png

 

I would appreciate any kind of help, thanks!

 

3 REPLIES 3
brenda89111
Frequent Visitor

Hi @f_r_1998,

I have tested your measure and your DAX is perfectly valid. 

 

I think the color deviation might be caused by either the color calibration of your monitor or a color blindness setting in your operating system.

 

One final suggestion: red and green is a notoriously bad color combination for most types of color blindness.  Have a look at this blog for inspiration.

 

Best of luck.

 

Schermafbeelding 2025-01-18 174045.png

rohit1991
Super User
Super User

hi @f_r_1998 ,

 

ArcGIS Maps in Power BI don’t support dynamic or DAX-based coloring (like mapping a measure to HEX codes or names). The only way you can set colors in this visual is by assigning a category (like “Good”/“Bad” or “Active”/“Inactive”) and then manually picking the color for each category in the visual’s Symbology (paint roller) settings.

How to make it work:

  1. Create a new column or measure that labels each data point by your rule, for example: If [KPI_switch_Dist] = 1, label as “Good”. If [KPI_switch_Dist] = 0, label as “Bad”

  2. Add this field to the Category well in the ArcGIS visual.

  3. Go to the paint roller (Symbology) options in the ArcGIS visual and assign your desired colors for “Good” and “Bad.”

If truly dynamic coloring is a must, consider using the standard Power BI Map or Shape Map visual instead—those do support “Data colors” that you can tie directly to your DAX logic. Red and green is a tricky combo for color-blind users consider blue/orange or blue/purple as an alternative if accessibility is a concern.

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Hi, thanks for your reply. I tried the measure you suggested but all the dots appear in grey (including the red ones). I am using the ArgGis map so there is no option in the format pane to set Data colors. Do you have maybe an other suggestion? Thanks! 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.