Forum Discussion

RahimZulfiqar's avatar
RahimZulfiqar
Icon for Advocate II rankAdvocate II
8 years ago
Solved

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 re...
  • Zubair_Muhammad's avatar
    8 years ago

    RahimZulfiqar

     

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

    Please see the attached file

     

     

    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
    )