Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Conditional Formatting one column based on another

I have two CSV files that look like this:   Data   Unit,CategoryA,CategoryB,CategoryC U1,99,90,82 U2,92,100,56 U3,96,50,66 U4,85,33,99 U5,21,94,100     Cutoffs   Unit,Cutoff U1,95 U2,90 U...
  • lkalawski's avatar
    lkalawski
    5 years ago

    Hi Anonymous

    If you cannot do this, you need to use visual Table and then write 3 measures (separate for each category) that will return the color code.

    CC Category A = 
    IF(SELECTEDVALUE('Table (3)'[Category A]) >= SELECTEDVALUE('Table (3)'[CutOff]), "#0f0","#f00")
    
    CC Category B = 
    IF(SELECTEDVALUE('Table (3)'[Category B]) >= SELECTEDVALUE('Table (3)'[CutOff]), "#0f0","#f00")
    
    CC Category C = 
    IF(SELECTEDVALUE('Table (3)'[Category C]) >= SELECTEDVALUE('Table (3)'[CutOff]), "#0f0","#f00")

     

    Then for each column separately (Cat A, B, C) set the background color from conditional formatting section. Select the Field Value from the list, and then select the appropriate measure.



    _______________
    If I helped, please accept the solution and give kudos! 😀