Forum Discussion

harirao's avatar
harirao
Post Prodigy
3 years ago
Solved

Custom icons for conditional formatting not working

Hi All,

I want to create conditional formatting using Icons based on the percentage measure created, below are the conditions which i want to use in Matrix table

But i am unable to use last condition i.e <75% to >125% getting below error 


Can you please assist me how to fix the below issue.

 

Thank for your help in advance.

 

Regards,

  • Hi harirao 

    Thanks for reaching out to us.

    In your screenshot, logic used is and, not or.

    please try this measure,

    Measure = 
    var _value= MIN('Table'[Attainment])
    return SWITCH(TRUE(),
    _value>0.75 && _value<0.85,"yellow",
    _value>0.85 && _value<1.15,"green",
    _value>1.15 && _value<1.25,"yellow",
    _value<0.75 || _value>1.25,"red")

    result

     

    Best Regards,

    Community Support Team _Tang

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

4 Replies

  • Watsky's avatar
    Watsky
    Solution Sage

    Hi harirao,

    The logic doesn't make sense. How can a percent be less than 75% but be greater than 125%? Is the 125% supposed to be -125%?

    • harirao's avatar
      harirao
      Post Prodigy

      Hello Watsky 

      Actually this Logic is specifically define as per the business requirement.

       

      Thank you

       

  • v-xiaotang's avatar
    v-xiaotang
    Community Support

    Hi harirao 

    Thanks for reaching out to us.

    In your screenshot, logic used is and, not or.

    please try this measure,

    Measure = 
    var _value= MIN('Table'[Attainment])
    return SWITCH(TRUE(),
    _value>0.75 && _value<0.85,"yellow",
    _value>0.85 && _value<1.15,"green",
    _value>1.15 && _value<1.25,"yellow",
    _value<0.75 || _value>1.25,"red")

    result

     

    Best Regards,

    Community Support Team _Tang

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

    • harirao's avatar
      harirao
      Post Prodigy

      Hi v-xiaotang 

      Please note i am getting below error, also wanted to know is not possible to use Condition formatting "ICON's" 


      Thank you