Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Conditional Formatting - FieldColor measure based on mutiple criteria

Hi! With release of August update, we can color by Field Value and that includes Measure. I have a requirement where I need to compare Multiple values and color my cells accordingly. Eg: When sho...
  • v-piga-msft's avatar
    7 years ago

    Hi Anonymous,

     

    I have made a test with the data sample similar with yours and create the measure similar with yours.

     

    ColorCell =
    SWITCH (
        TRUE (),
        SUM ( Sheet100[Value] ) <= 500
            && MAX ( 'Sheet100'[Type] ) = "EU"
            && MAX ( 'Sheet100'[Attribute] ) = "P1", "#b200ff",
        SUM ( Sheet100[Value] ) <= 500
            && MAX ( 'Sheet100'[Type] ) = "AS"
            && MAX ( 'Sheet100'[Attribute] ) = "P2", "#0000b2",
        SUM ( Sheet100[Value] ) <= 500
            && MAX ( 'Sheet100'[Type] ) = "AM"
            && MAX ( 'Sheet100'[Attribute] ) = "P2", "#b200cc"
    )
    

    Here is the ouput which I think that is right.

     

    Best Regards,

    Cherry