Forum Discussion

badger123's avatar
badger123
Icon for Resolver I rankResolver I
7 years ago
Solved

Highlight max value in column chart

Hi all,   I'm trying to figure out how to highlight the max value in my simple column chart. E.g. here I would like Feb 2019 bar to be a different colour from the rest. Please can someone help?   ...
  • TomMartens's avatar
    7 years ago

    Hey,


    I created this measure:

    Measure = 
    var allthedatesused = ALLSELECTED('simple table'[some kind of date])
    var themaxvalue = MAXX(allthedatesused, CALCULATE(SUM('simple table'[quantity])))
    return
    IF(sum('simple table'[quantity]) = themaxvalue,"#ff6600")


    Then I assigned this measure to the data color (mark the chart, and select formatting window) advanced controls (formerly known as conditional formatting)

     

    and chose this setting:

     

     

    After that my sample chart will look like this:

     

     

    If this is not what you are looking for

    please provide a pbix with some sample data, upload the pbix to onedrive or dropbox and share the link.

     

    Regards,
    Tom

  • badger123's avatar
    badger123
    7 years ago

    TomMartens Awesome, thanks! It worked a treat. It seems to only work when using a column with date format and I'm trying to display axis like you have on the chart MMM YYYY or MMM YY. Do you know how I can do this?