RYG formula question
I need some help with tweaking the below:
=IF(OR([Actual Completion Percentage %]@row = 1, [Schedule Variance]@row >= 0.9, AND([Actual Completion Percentage %]@row >= 0, [Baseline Start]@row > TODAY())), "Green", IF(OR([Schedule Variance]@row >= 0.8, IF(OR([Schedule Variance]@row < 0.9, AND([Baseline Start]@row < TODAY(), [Actual Completion Percentage %]@row = 0)), "Yellow", AND([Baseline Start]@row < TODAY(), [Actual Completion Percentage %]@row = 0)), "Red", IF(OR([Schedule Variance]@row < 0.8, AND([Baseline Start]@row < TODAY(), [Actual Completion Percentage %]@row = 0)), "Red", IF(AND([Actual Completion Percentage %]@row = 0, [Baseline Start]@row > TODAY()), "")))))
I am trying to state: Green is greater than 0.9, yellow is between 0.8 and 0.9, and red is anything less than 0.8
Answers
-
I find it helps to break out IF statements into individual "sentences" to see where there may be an issue. The way I do this is by putting each "IF" on its own line.
For example, I did this with yours and bolded where I think there may be a mixup of logic statements:
=IF(OR([Actual Completion Percentage %]@row = 1, [Schedule Variance]@row >= 0.9, AND([Actual Completion Percentage %]@row >= 0, [Baseline Start]@row > TODAY())), "Green",
IF(OR([Schedule Variance]@row >= 0.8,
IF(OR([Schedule Variance]@row < 0.9, AND([Baseline Start]@row < TODAY(), [Actual Completion Percentage %]@row = 0)), "Yellow",
AND([Baseline Start]@row < TODAY(), [Actual Completion Percentage %]@row = 0)), "Red",
IF(OR([Schedule Variance]@row < 0.8, AND([Baseline Start]@row < TODAY(), [Actual Completion Percentage %]@row = 0)), "Red",
IF(AND([Actual Completion Percentage %]@row = 0, [Baseline Start]@row > TODAY()), "")))))
Try this instead:
=IF(OR([Actual Completion Percentage %]@row = 1, [Schedule Variance]@row >= 0.9, AND([Actual Completion Percentage %]@row >= 0, [Baseline Start]@row > TODAY())), "Green",
IF(AND([Schedule Variance]@row >= 0.8, [Schedule Variance]@row < 0.9, [Baseline Start]@row < TODAY(), [Actual Completion Percentage %]@row = 0)), "Yellow",
IF(OR([Schedule Variance]@row < 0.8, AND([Baseline Start]@row < TODAY(), [Actual Completion Percentage %]@row = 0)), "Red",
IF(AND([Actual Completion Percentage %]@row = 0, [Baseline Start]@row > TODAY()), ""))))
Let me know if that solved the problem!
Cheers,
Genevieve
Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.
-
HI @Melissa Torrez,
For the statement at the bottom of your post, you can try with =IF([Schedule Variance]@row < 0.8, "Red", IF([Schedule Variance]@row < 0.9, "Yellow", "Green")) and then add complexity to the formula with additional conditions as needed.
I hope this can also be of help!
Julio
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 83 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 489 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!