cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SChavez
Frequent Visitor

Calculate $ and % fields dynamically based on change of each other

I've managed to solve my issue on one side, but not dynamically based on two fields referencing each other. 

 

What I have: 

  • Order $ field
  • Estimated $ field
  • Estimated % field

All live in a form, all are editable.

 

What I need:

The estimated field should be: Estimated field = Order $ * Estimated %

 

BUT, the estimated field can also manually be set, in which case I need the Estimated % to change.

Estimated % = estimated $/order $*100.

 

So based on which estimated field is changed the other needs to dynamically change accordingly. In my attempts, I get a circular reference error. 

 

Any help is greatly appreciated. 

 

5 REPLIES 5
JR-BejeweledOne
Super User
Super User

To make sure I understand.  This is the formula for the Estimated $ field?

The estimated field should be: Estimated field = Order $ * Estimated %

 

What should the formula be for the Estimated Percent field?

 

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

@JR-BejeweledOne 

 

Correct.

 

Estimated percent is the estimated $ divided by the order $ * 100

JR-BejeweledOne
Super User
Super User

I think something is missing here.   If both Estimated $ and Estimated % start out blank and are relying on each other, you won't get any sort of result.  

 

For example, if there were no error, both Estimated $ and Estimated % start out as Zero.   If my order $ is 150 and I multiply that by 0% (Estimated $), I get a zero value.

 

So is there a default percentage or number that you would be using?  Otherwise I am not sure how your calculations are going to work

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

On initial creation in the form, the user would be setting order $ and estimates (either $ or %). 

 

Could start with a common % if that's needed to make it work. Something like 5%. 

JR-BejeweledOne
Super User
Super User

Try this.  For your Estimate $

 

  1. OnChange Property:  Set(varEstimateDollar, Value(Self.Text))
  2. Default Property:  Value(Order.Text) * varPercent

Leave the Estimate% formulas the same.

 

This should solve your circular error situation.    It will update the variable if the field is manually changed again and everything should calculate dynamically

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,459)