Issue 16764 - AVERAGE function processed as SUM
Summary: AVERAGE function processed as SUM
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 RC3
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: oc
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-13 02:53 UTC by philmperry
Modified: 2003-09-19 09:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
demonstrate how AVERAGE function changes to SUM (5.32 KB, text/plain)
2003-09-18 05:07 UTC, philmperry
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description philmperry 2003-07-13 02:53:11 UTC
Set up a database with at least 3 columns. In Data>Subtotals ask for the AVERAGE
on two of the columns (that would be two groupings, on the same field). The
first column will get its AVERAGE, while the second column changes to a SUM.
Comment 1 oc 2003-08-08 15:24:29 UTC
I could not reproduce this problem. Please retry with a newer version
of OOo (OOo 605 was a really early testbuild)
Comment 2 philmperry 2003-08-08 23:18:34 UTC
Actually this was in 1.1 Beta 2, but I wasn't offered the choice in
the input panel of anything beyond 605 (IIRC, just 1.0.1, 1.0.2,
1.0.3, and 605). Maybe BugZilla was just having a bad day. Does that
change the analysis or was this fixed since Beta 2? I'll send
step-by-step way to replicate on Beta 2 if you want it.
Comment 3 oc 2003-09-17 09:57:43 UTC
Please add a step-by-step description or/and attach a sampledocument
to reproduce the problem.
Comment 4 philmperry 2003-09-18 04:30:53 UTC
Well, my floppy drive is broken and the LAN is broken, so I'll have to
show it to you here:

    A      B      C      D       E                            F
1 Sales   Comm.  Col.  Sales   Comm%                        Comm$
2 $0.00   10.0%   2    $140.00 =VLOOKUP(D2;A1:B4;C2;TRUE)   =D2*E2
3 $100.00 10.5%    
4 $200.00 11.0% 

Note that the 'TRUE' in E2 gets changed to '1'. For the Sales value
(D2) of $100.00, which exactly matches one of column A's values, E2
shows 10.5% (works correctly). For D2 of $140.00, E2 shows '#N/A'. A
WORKAROUND I just found while typing this in is to change A1:B4 to
A2:B4, but then the operation of VLOOKUP does not match Excel. Excel
permits the inclusion of column labels in the lookup table range,
while Calc apparently chokes on them. If you want to consider this an
enhancement request (to work Excel-style) instead of a bug, I could
live with that.
Comment 5 philmperry 2003-09-18 05:07:49 UTC
Created attachment 9438 [details]
demonstrate how AVERAGE function changes to SUM
Comment 6 philmperry 2003-09-18 05:09:35 UTC
Please ignore the above entry about VLOOKUP; it was intended for issue
19089.
Comment 7 utomo99 2003-09-18 07:22:21 UTC
I suggest you create a simple file, just to show this, and explain it
step by step. 
I already download your file but too many data, and not enough
explanantion. 
I think you can just use some data, and in real calc file, if it is
calc problem. dont use the writer file
Comment 8 frank 2003-09-19 09:20:19 UTC
Hi Phil,

you have to select the calculation function for each subtotal group.
As far as I can see, you checked first the munchies box, when the
thirstees and now selected the average function. But this effects only
the thirstees selection. 

So I have to close this one as invalid.

Frank
Comment 9 frank 2003-09-19 09:20:36 UTC
closed invalid