The sum(dr.loan_starting_balance + dr.loan_net_change) part of the calculation have a single date, the last day in a date range chosen by the user
Sum(ds.pulled_loan_total) and sum(ds.renew_loan_amount) both have a range of dates chosen by the user
What I need it the result of the second _expression_ divided by the result of the first _expression_.
By your post it sounds like you just need to join your two queries and then use the formula:
Sum(ds.pulled_loan_total) and sum(ds.renew_loan_amount ) / sum(dr.loan_starting_balance + dr.loan_net_change)
but if it were this simple you probably would have it figured out by now. Data examples help us help you much better.
==================================================================
Aaron Bono
Aranya Software Technologies, Inc.
http://www.aranya.com
http://codeelixir.com
==================================================================