Forum Discussion

rafamorim87's avatar
rafamorim87
Frequent Visitor
2 years ago
Solved

Adjust Column Colors

Good morning Could anyone help me with this question? I need to build the table graph so that the largest and smallest values ​​are highlighted with the color I enter and the other columns are high...
  • Ritaf1983's avatar
    2 years ago

    Hi rafamorim87 
    You can create all the colors logics with dax ,
    For example :

    Bar color =
    var min_value = CALCULATE(minx(SUMMARIZE('Table','Table'[Team],"_sum values",sum('Table'[values])),[_sum values]),ALLSELECTED('Table'[Team]))
    var max_value = CALCULATE(Maxx(SUMMARIZE('Table','Table'[Team],"_sum values",sum('Table'[values])),[_sum values]),ALLSELECTED('Table'[Team]))
    Return
    SWITCH(TRUE(),
    sum('Table'[values])=min_value,"Yellow",
    sum('Table'[values])=max_value,"green",
    "black")
     
    ** The color can be In hexacode 
    and then just take this measure as a field to conditional formatting :

    the pbix is attached

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