Forum Discussion

saud968's avatar
saud968
Memorable Member
2 years ago
Solved

Conditional Formatting in matrix visual

Conditional formatting for an average of % in the matrix visual is not working... 0-4% should be green 5-10% in yellow and 11% above in red. You can review the screenshot below


Abandon % is calculated column - 

Abandon % = IF(support__cw_ops_manage_case_merge_temp[ABANDONED_CHAT_FLAG] = 0, 0, support__cw_ops_manage_case_merge_temp[Total_Chat_Count] / support__cw_ops_manage_case_merge_temp[ABANDONED_CHAT_FLAG])

 

lbendlin Ahmedx 

  • Never Mind I was able to fix it, I changed the value a decimal number and found that in the rules i should use 0.04 and further so once it was fixed I changed it back % and it is working fine. Thank you for all your help

19 Replies

  • you need to crate measure

     

     

     

    CF = SWITCH( TRUE(),
        [Abandon %] <= 0.04,"#008000",
        [Abandon %]<= 0.1 ,"#FFFF00",
        "#FF0000"
          )

     

     

     

    and then follow the pictures

    • saud968's avatar
      saud968
      Memorable Member

      Unfortunately, the Abandon % is not reflecting in the measure you suggested

      • saud968's avatar
        saud968
        Memorable Member

        I tried both but everything is going green

        this does not show the calculated column so not working

        CF = SWITCH( TRUE(),
            [Abandon %] <= 0.04,"#008000",
            [Abandon %]<= 0.1 ,"#FFFF00",
            "#FF0000"
              )




        This is turning everything in green

        ColorCategory =
        VAR AbandonPercentage = AVERAGE(support__cw_ops_manage_case_merge_temp[Abandon %])
        RETURN
            SWITCH(
                TRUE(),
                AbandonPercentage >= 0 && AbandonPercentage <= 0.4, "Green",
                AbandonPercentage > 0.4 && AbandonPercentage <= 0.1, "Yellow",
                AbandonPercentage > 0.1, "Red",
                BLANK()  
            )

         

    • saud968's avatar
      saud968
      Memorable Member

      I tried this and followed the screenshot given by you

       

      ColorCategory =
      VAR AbandonPercentage = AVERAGE(support__cw_ops_manage_case_merge_temp[Abandon %])
      RETURN
          SWITCH(
              TRUE(),
              AbandonPercentage >= 0 && AbandonPercentage <= 4, "Green",
              AbandonPercentage > 4 && AbandonPercentage <= 10, "Yellow",
              AbandonPercentage > 10, "Red",
              BLANK()  
          )


      but I am getting the below 

       

      • Ahmedx's avatar
        Ahmedx
        Super User

        pls try this

        CF = SWITCH( TRUE(),
            [Abandon %] <= 0.04,"#008000",
            [Abandon %]<= 0.1 ,"#FFFF00",
            "#FF0000"
              )
  • try this

    CF = SWITCH( TRUE(),
        [Abandon %] <= 0.04,"#008000",
        [Abandon %]<= 0.1 ,"#FFFF00",
        "#FF0000"
          )