Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New Formula based on other Formula

Status
Not open for further replies.

FluffyKitty

Instructor
Joined
Jul 8, 2002
Messages
8
Location
US
I currently have a report GROUPED by [Employee_Name] with the following fields: [Total_Orders], [Total_Minutes_per_Order], and [Total_Cost_per_Order] in the GROUP FOOTER. These calculations work great, but when I attempt to calculate the OVERALL [Avg_Cost_per_Order] in the REPORT FOOTER using the following formula: [Total_Cost_per_Order]/[Total_Orders] I do not get the correct value.

Here are my current forumlas:

FIELD:[Total_Minutes_per_Order]
NumberVar TotalSec := datediff("s", minimum({qry_Efficenies.STATUS_DT},{qry_Efficenies.USER_NAME}), maximum({qry_Efficenies.STATUS_DT},{qry_Efficenies.USER_NAME})) ;
NumberVar Hours := Truncate (Remainder ( TotalSec,86400) / 3600)*60;
NumberVar Minutes := Truncate (Remainder ( TotalSec,3600) / 60);
Hours + Minutes

FIELD:[Total_Cost_per_Order]
${@Total_Minutes_per_Order}*1.49

Any input would be helpful. Thank you in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top