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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Conditional Color Formating

I have used a Slicer which contains country values 'US', 'UK', 'Canada','India' and I made it horizontal view(Shows in Block) where each country have multiple cities. I Want to give each country block a specific color based on certain conditions: Condition1: If all cities are green then only Country colour should be green Condition2: If any one citiy is yellow then Country colour should be Yellow Condition3: If more than one city is Yellow OR if any city is Red then only Country colour should be Red Condition4: If any other colours than above then Country should be Grey Along with calulation i need to know how or where should i use this calcualtion so Blocks can show the colur correctly on conditions
3 REPLIES 3
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

Have you solved this question with help? If you have solved the question, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.

If you need more help, please let me know.

 

Best Regards,

Community Support Team _Tang

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

v-xiaotang
Community Support
Community Support

Hi @Anonymous 

Kindly read this article, 

vxiaotang_0-1639720626682.png

and here's a similar solution for your reference, https://community.powerbi.com/t5/Desktop/Conditional-Formatting-based-on-calculated-measure/m-p/640345

If you have trouble creating the measure, please let me know. And please provide 

(1) a sample file, you can replace raw data with bogus data to protect privacy,

(2) or provide some sample data that fully covers your issue/question

(3) give your expected result based on the sample you provide

Thanks.

 

Best Regards,

Community Support Team _Tang

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

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors