View Full Version : Help with dividing one row by another


dragonfly0802
04-14-2010, 07:16 AM
I have a database that tracks sales calls. Each time a sales person leaves a voicemail, receives a call back, speaks to a customer or sets up an appointment a record is created. (i've attached a document with sample data)

My dilemma lies in that I need to report by week and I need to be able to divide one row value by another. Here's where I've gotten to so far:

I created a summary query that totals the count of each communication type within each week and gives a count.

I created a crosstab query that shows each value based on the week number.

I need to now divide total voicemail/call backs and total conversations/appt set.

Any ideas on how I can do this? (again additional information and sample data is in the attached file).

JamesMcS
04-14-2010, 07:39 AM
There's prbably a better way but how about dlookup? You can use that to pull back a value based on SQL-like WHERE conditions. So, just do dlookup(value a....)/dlookup(value b...)

You'll have to check the help file for syntax but as long as each record has a unique ID number you'll be OK.

dragonfly0802
04-14-2010, 07:50 AM
Thank you James. I will give that a try I'm just not sure how it will work out with the crosstab I have created.

JamesMcS
04-14-2010, 11:52 PM
Do you want to show the results of the divisions in the crosstab? You can use the calculation as your value in query design.