S
scs
I am trying to create a query that will calculate estimated monthly revenue.
I want to calculate how much someone's payment amount averages monthly?
tblPayment
--------------
PaymentID
PaymentDate
CustomerID
Description
PaymentAmount
PaymentMethod
StartDate
RenewalDate
Comment
I'd like to take the last payment amount in the table and divide it by the
difference between RenewalDate & StartDate *30 days. This would roughly
give me a daily amount times 30. So far I have built a query that gives me
the CustomerID, last PaymentDate (using max PaymentDate), and PaymentAmount.
Whenever I try adding expressions it either gives me all records in the
payment table or a divide by 0 error. I made another query that looks at
the payment table and does the math but I can't seem to only do it for the
last payment. Customers have mutiple payments. How can I design a query
for the information I need?
I want to calculate how much someone's payment amount averages monthly?
tblPayment
--------------
PaymentID
PaymentDate
CustomerID
Description
PaymentAmount
PaymentMethod
StartDate
RenewalDate
Comment
I'd like to take the last payment amount in the table and divide it by the
difference between RenewalDate & StartDate *30 days. This would roughly
give me a daily amount times 30. So far I have built a query that gives me
the CustomerID, last PaymentDate (using max PaymentDate), and PaymentAmount.
Whenever I try adding expressions it either gives me all records in the
payment table or a divide by 0 error. I made another query that looks at
the payment table and does the math but I can't seem to only do it for the
last payment. Customers have mutiple payments. How can I design a query
for the information I need?