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
RahimZulfiqar
Frequent Visitor

How to highlight Maximum and Minimum Column Chart Bar in Power BI?

I have created Column chart in POWER BI. All the bars in the column chart are with same color. Now I need that Maximum Bar should have fill color of GREEN and Minimum bar fill color in RED and the remaining in any one color. How to do that?

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@RahimZulfiqar

 

You can do it with the help of color saturation property of column chart

Please see the attached file

 

consitionalformattingcahrt.png

 

I defined a simple MEASURE and put it in the Color Saturation Field

 

 

Measure =
SWITCH (
    TRUE (),
    SUM ( Table1[Values] )
        = CALCULATE ( MAX ( Table1[Values] ), ALLSELECTED ( Table1[Category] ) ), 1,
    SUM ( Table1[Values] )
        = CALCULATE ( MIN ( Table1[Values] ), ALLSELECTED ( Table1[Category] ) ), 2,
    0
)

Regards
Zubair

Please try my custom visuals

View solution in original post

4 REPLIES 4
Zubair_Muhammad
Community Champion
Community Champion

@RahimZulfiqar

 

You can do it with the help of color saturation property of column chart

Please see the attached file

 

consitionalformattingcahrt.png

 

I defined a simple MEASURE and put it in the Color Saturation Field

 

 

Measure =
SWITCH (
    TRUE (),
    SUM ( Table1[Values] )
        = CALCULATE ( MAX ( Table1[Values] ), ALLSELECTED ( Table1[Category] ) ), 1,
    SUM ( Table1[Values] )
        = CALCULATE ( MIN ( Table1[Values] ), ALLSELECTED ( Table1[Category] ) ), 2,
    0
)

Regards
Zubair

Please try my custom visuals

Any step by step tutorial ?

@RahimZulfiqar

 

I only learnt this technique by trial and error after your post Smiley Tongue

 

Thanks for this question

 

 

 


Regards
Zubair

Please try my custom visuals

@RahimZulfiqar

 

sorry i didn't mention it earlier

the colors can be chosen from the data colors section

 

colors.png


Regards
Zubair

Please try my custom visuals

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.