Forum Discussion

graefs's avatar
graefs
Frequent Visitor
2 years ago
Solved

Conditional Formatting - Standard Table

Problem: I cannot conditionally format based on two seperate KPIs we have set (See below).   Attempted Solutions: -Switch Statements (I have only seen examples with one condition.. example if Type...
  • _AAndrade's avatar
    2 years ago

    Hi,

    Please try this:

     

    Color Format = 
    VAR _Metric = SELECTEDVALUE(T_CondFormat[Metric])
    VAR _Value = SELECTEDVALUE(T_CondFormat[Jan])
    VAR _Result = 
    
    SWITCH(
        TRUE(),
        _Metric IN {"Quality", "Velocity"} && _Value >=0.98 || _Metric IN {"Utilization"} && _Value >=0.93, "GREEN",
        _Metric IN {"Quality", "Velocity"} && _Value >=0.975 || _Metric IN {"Utilization"} && _Value >=0.91, "YELLOW",
        _Metric IN {"Quality", "Velocity"} && _Value < 0.975 || _Metric IN {"Utilization"} && _Value < 0.91, "RED"
    )
    
    RETURN
        _Result

     


    Probably you need to create one of this measures for each column with values, but it depends of your data model.

     

    Example of the output for column Jan: