× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Don

It's somewhat annoying, but I think you could achieve this effect by doing
the query in two passes.

First pass selects the data and outputs to a file.
Second pass does the calculations and outputs to print.

Using a second pass was also good for calculating percentages in the totals
and ordering by a result in the totals.

Haven';t thought too hard about it (just crawled out of bed) so I hope this
helps.

Regards
Evan Harris

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Don Cavaiani
Sent: Wednesday, 9 April 2008 2:56 a.m.
To: Midrange Systems Technical Discussion
Subject: Calculation at Sub-total level with qry400

Item# Vend# Delivery Qty Price Extended
860467 10380 2007/09/10 185 2.240 414.40
860467 13451 2007/10/05 400 2.630 1,052.00
860467 13451 2007/11/26 110 2.630 289.30
860467 13451 2008/04/14 24 2.630 63.12
860467 15254 2007/03/15 400 .640 256.00
860467 15254 2007/07/02 700 .640 448.00
860467 15254 2007/09/24 507 .830 420.81
860467 15254 2008/01/07 700 .830 581.00
860467 15254 2008/02/04 700 .830 581.00

TOTAL 3,726 ?????
4,105.63

I don't believe there is a way to get this MISSING "weighted average" Price
calculation: 4,105.63 divided by 3,726 performed at the sub-total level
( I know Sequel can do so).

Thanks,
Don

Don F. Cavaiani
IT Manager
Amerequip Corp.
920-894-7063

"It's amazing what you can accomplish if you don't care who gets the
credit." Harry S. Truman




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.