Announcements
Hi...... i have two fields
field 1: Agreed
field 2: Actual
i would like to know how to write the calculation that IF the Actual field has a variance of greater than or equal to 20%, the Actual cell will turn YELLOW. can someone help me with writing the code in the Actual field?
thank you in advance
Hi @cnorris3570 ,
Assuming White as the other Colour
If( Abs(Actual - Agreed) / Actual > 0.2, Yellow, White )
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi,
I assume you already made a label to calculate the variance.
In Color properties of field 2, put this:
If( field2-labelname.Text = "Actual", Yellow, Black )
Hope that is what you're trying to find and if it is, please Accept as a solution.
Thank you.
i like this sir..... for my understanding, just curious why you chose Abs versus the VarP?
@cnorris3570 ,
I am probably a bit old-school - Abs() removes any negative element, so -2 and 2 both return 2 (which is what you wanted to show variance either way) and has been around for a long time in many applications.
thank you sir. this worked
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 392 Most Valuable Professional
11manish 181 Super User 2026 Season 2
MS.Ragavendar 112 Super User 2026 Season 2