Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Conditional formatting based on % of another column

 I need the EAC column to change colors (stoplight) as follows:

green=EAC is 90% or less of the Approved Budget

yellow=EAC is 100% or less of the Approved Budget

red=EAC is 100% or greater of the Approved Budget.

 

I can't seem to get conditional formatting right, nor can I figure out the Dax for this.  The EAC column is a measure (if that makes a difference).  Here is the conditional formatting that shows the colors as above.  As you can see, it isn't behaving as I'd like.  I THINK it's partly because there is an overlap...

Any suggestions would be appreciated!

 

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Okay, so I finally figured it out.  I changed the percentages to 'number' on the dropdown and added the decimal.  That, in it's self still wasn't working correctly.  I discovered that you were partially correct in that, but not 100%.  What works (the way I need it to) is to change the first value ("is" statement) to percent.  Now, the icons are the correct color according to my needs.  I appreciate your help in getting me there!

     

12 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Okay, so I finally figured it out.  I changed the percentages to 'number' on the dropdown and added the decimal.  That, in it's self still wasn't working correctly.  I discovered that you were partially correct in that, but not 100%.  What works (the way I need it to) is to change the first value ("is" statement) to percent.  Now, the icons are the correct color according to my needs.  I appreciate your help in getting me there!

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    The additional column won't work for my needs.  I need the EAC column to change color.  From the link you sent, it would appear that Power BI isn't capable of doing what I'm wanting.  Is this correct?

  • Anonymous's avatar
    Anonymous
    Not applicable

    I found a work around that almost works.  Can someone tell me WHY IN THE WORLD the conditional formatting isn't working?  I've tried it several different ways and it acts like it's not reading the % correctly.  The ones that are currently yellow should be red and the one with no icon should be yellow.  Is it because that What% column is a measure?

     

    • ziyabikram96's avatar
      ziyabikram96
      Icon for Helper V rankHelper V

      you should change the percentage value into decimal like 15% into .15 

      • Anonymous's avatar
        Anonymous
        Not applicable

        Thank you for the suggestion.  I tried it.  The result is blanks where the icons should be. 😞