Compare records in the same table

  • 0
  • 1
  • Question
  • Updated 2 months ago
  • In Progress
How can I compare records in the same table.  For example how could I compare a payment from the customer for the current month vs the prior month?  I need to be able to identify payments that have a monthly variance that is outside of a given tolerance.  Thank you in advance for any suggestions you might have.
Photo of Brett Hinman

Brett Hinman

  • 130 Points 100 badge 2x thumb

Posted 2 months ago

  • 0
  • 1
I am sure you have the customer as the parent (lookup) for the payments table. On that relationship, create two summary date fields. 1. For the max date of the payment for the current month and 2) for the previous month. Then you can figure out the different between these two dates and calculate your variance.
Photo of Brett Hinman

Brett Hinman

  • 130 Points 100 badge 2x thumb
Thank you Surya!  That's exactly what I needed.