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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
amirabedhiafi
Impactful Individual
Impactful Individual

Color min and max value in a bar chart

I have the following bar chart : 

 

Captur.PNG

 

I want to color the max and the min bar chart with red and green respectively  when choosing any filter.

So De Ruyter will be in red and New Britain in green.

Amira Bedhiafi
Full Stack Business Intelligence Consultant @Capgemini
1 ACCEPTED SOLUTION

Hey @amirabedhiafi ,

the conditional formatting has moved :-), I'm sorr for the inconvenience. Here you can add the measure that colors the min and the max value:

TomMartens_0-1607371782173.png

Hopefully, this is what you are looking for.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

5 REPLIES 5
Johanno
Responsive Resident
Responsive Resident

To set color by value depending on the filtered value, create a measure like:

 

Color coding = 
SWITCH (SELECTEDVALUE('Table'[Country]),
        "New Britian", "#00ff00",
        "De Ruyter", "#ff3300"
)

 

 

Then set color by using fx - format by "Field value" - Based on field Color coding (or the name of the measure)

 

Is that answer to the question?

How do you do this using a maximum and minimum variable? Suppose "New Britian" is the minimum, and vice versa.

TomMartens
Super User
Super User

Hey @amirabedhiafi ,

 

I assume the answer in this article contains what you are looking for: Solved: Re: Highlight max value in column chart - Microsoft Power BI Community

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hey @TomMartens  I can't find the Advanced Controls in Data Color with the latest update of PowerBI.

Amira Bedhiafi
Full Stack Business Intelligence Consultant @Capgemini

Hey @amirabedhiafi ,

the conditional formatting has moved :-), I'm sorr for the inconvenience. Here you can add the measure that colors the min and the max value:

TomMartens_0-1607371782173.png

Hopefully, this is what you are looking for.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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