Calculating an average price and then using it to understand value of agreement

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
I have read a number of responses discussing averages and *don't believe* mine is exactly the same so I am posting for help. I have an app with a number of tables including...

  1. Customers: parent table, customer may have many agreements
  2. Agreements: child table, each agreement is associated with 1 customer and 1 product
  3. Products: links to agreements, there is a 1-1 relationship between agreements and products

Product price changes all the time, new product record added and old product inactive meaning user cannot associate an inactive product to a new agreement.

For time being I would like to calculate the average agreement amount for all agreements matching it to the same product and then compare it against the agreement I am looking at. Hoping the attached example helps.
Photo of Owen

Owen

  • 0 Points

Posted 2 years ago

  • 0
  • 1
Photo of Owen

Owen

  • 0 Points
Posting an update, I did just figure this out based on my current setup. I added a Summary field on the Products table that calculates the average price for each products based of the agreements that are attached to this. I then, using a reverse relationship on the Agreements and Products table shared the [Average Amount] and this then allowed me to calculate how much each Agreement deviates from the [Average Amount].