Forum Discussion

neskowin's avatar
neskowin
Frequent Visitor
3 years ago
Solved

Conditional formatting one column based on a value in a matrix visual with multiple columns

I have been struggling to figure out conditional formatting in what appears to a be a complex set up. I'd appreciate any help you can extend to resolve it. I have the following matrix visual. The ro...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  neskowin ,

     

    According to your description, here are my steps you can follow as a solution.

    (1)My test data is the same as yours.

    (2) We can create two measures. 

     

    measure = SUM('Table'[value])
    color = var a=MAXX(FILTER(ALLSELECTED('Table'),[Test]="A"&&[attribute]="Score"&&[Method]="x"),[value])
    var b=MAXX(FILTER(ALLSELECTED('Table'),[Test]="A"&&[attribute]="Score"&&[Method]="y"),[value])
    return IF(OR(SELECTEDVALUE('Table'[Test])="A",SELECTEDVALUE('Table'[attribute])="Score"),"White",(IF(or(SELECTEDVALUE('Table'[Test])="B"&&SELECTEDVALUE('Table'[Method])="x"&&SUM('Table'[value])>a,SELECTEDVALUE('Table'[Test])="B"&&SELECTEDVALUE('Table'[Method])="y"&&SUM('Table'[value])>b),"green","red")))

     

    (3)Set the conditional formatting as shown in the following figure and then the result is as follows.

     

     

     

     

    Best Regards,

    Neeko Tang

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