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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
GrimReaperX
Helper II
Helper II

Conditional formatting on Shape Map

Hello, 

 

I would like to manage colors on the Shape Map based on certain conditions. I have projects and statuses low, medium and high. I would like to show high risk projects red, medium risk projects yellow and low risk projects green on the shape map. My current map only shows the projects at high risk. My dax can be seen below,

High Risk projects=
CALCULATE(
    COUNT(Projects[ContentType]),
    Projects[Risk Level]="High",
    Projects[ContentType]="A" || Projects[ContentType]="B"
)

Based on the formula above, I only show Maxiumum=1 values to show high risk projects red color on the map. However, I am not able to find a way to assign Low and Medium colors on the map at the same time. 

GrimReaperX_0-1694185467250.png

 

If there is existing project with high status I want to assign the country red. If country has both medium and high items, country should be assigned red too. Same logic applies for medium and low statuses.

 

Anyone who has any idea?

 

Thank you!

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @GrimReaperX 

 

You can try the following methods.

Measure = SWITCH(TRUE(),
SELECTEDVALUE('Table'[Risk Level])="High","Red",
SELECTEDVALUE('Table'[Risk Level])="Medium","Blue",
SELECTEDVALUE('Table'[Risk Level])="Low","Green")

vzhangti_2-1694397181828.png

vzhangti_4-1694397212898.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @GrimReaperX 

 

You can try the following methods.

Measure = SWITCH(TRUE(),
SELECTEDVALUE('Table'[Risk Level])="High","Red",
SELECTEDVALUE('Table'[Risk Level])="Medium","Blue",
SELECTEDVALUE('Table'[Risk Level])="Low","Green")

vzhangti_2-1694397181828.png

vzhangti_4-1694397212898.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello,

 

Thanks for the reply. However, my table shows the same color for all of the countries. I have different table for countries and different table for Risk level. I also use custom map but not predefined maps. Could you please help? 

 

Thanks!

Hi, @GrimReaperX 

 

Can you provide sample data for testing? Sensitive information can be removed in advance. And give an example of the output you expect.

 

Best Regards

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors