9 Replies Latest reply on May 4, 2018 10:40 AM by Jacynthia Spruill

# Add Colors Based on If Then Formula

I am trying to add color to individual measures based on the formula below. I have a different if/then formula for each measure but I need the same end result. If "Excellent" or "Good", I want to be able to color green. If "Bad" I want to color Red. Please see the chart snippet and formula below.

IF [# of Days to AAG Approval]<3 THEN "Excellent" ELSEIF [# of Days to AAG Approval]=3 THEN "Good" ELSE "Bad" END

• ###### 1. Re: Add Colors Based on If Then Formula

Hi, Jacynthia

It depends on how your workbook looks like, can you provide a sample workbook?

ZZ

• ###### 2. Re: Add Colors Based on If Then Formula

Jacynthia-

Is this what you're looking for?

The bars are countd(order ID) for each "Sub-Category". Status is your formula

IF [Days in Between] < 5 THEN "Excellent" ELSEIF [Days in Between]= 5 THEN "Good" ELSE "Bad" END

Field Days in Between is the difference of days in between "Order Date" and "Ship Date"

Place the status in "Color" > Edit Color > Assign Green to both Good and Excellent, Red to Bad.

Hope this helps.

Thanks,

Shiva.

1 of 1 people found this helpful
• ###### 3. Re: Add Colors Based on If Then Formula

This is exactly what I am looking for..thank you...where do I place the STATUS formula. I have a formula for each of my four measures.

• ###### 4. Re: Add Colors Based on If Then Formula

Hello ZZ…I see that ShivaRam Chennapragada has just the answer that I need. Thank you for your help!

Jacynthia

• ###### 5. Re: Add Colors Based on If Then Formula

Jacynthia- My solution is for a single measure. Can you mock up some data and attach a packaged workbook per ZZ's suggestion?

• ###### 7. Re: Add Colors Based on If Then Formula

Jacynthia- I'm currently working on it, the data is structured differently than I expected it to be hence taking longer. Would ask for Zhouyi Zhang's help for quicker solution.

• ###### 8. Re: Add Colors Based on If Then Formula

I do not want to take up a lot of your time. I can restructure my data if it helps to make meeting my end goal a simpler process. I do not have to have an answer right now….I will send ZZ my file, though. Please note, I am not in a rush for an answer.

• ###### 9. Re: Add Colors Based on If Then Formula

ZZ…If it does not take up much of your time, please let me know if there is a pretty simple way to add color using the four calculations I have in my worksheet.

For example:

With the ACCOUNTING APPROVAL CALC shown here, I would like EXCELLENT and GOOD results to be Green and BAD results to be red. So, if the # of days to approval is five the bar would show green for zero to one and Red for the area above 1.

IF <1 THEN "Excellent" ELSEIF =1 THEN "Good" ELSE "Bad" END

Thank you…Jacynthia