Forum Discussion

BrettHinman1's avatar
BrettHinman1
Qrew Trainee
7 years ago

Compare records in the same table

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.
  • SuryaExpert's avatar
    SuryaExpert
    Qrew Assistant Captain
    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.