Bug 153249 - Sumif appears to give wrong result
Summary: Sumif appears to give wrong result
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.4.3.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-27 17:23 UTC by Roberto
Modified: 2023-01-28 16:31 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
screenshot (121.50 KB, image/png)
2023-01-27 17:25 UTC, Roberto
Details
test spreadsheet (23.68 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-01-28 02:12 UTC, Roberto
Details
screenshot (147.83 KB, image/png)
2023-01-28 02:14 UTC, Roberto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roberto 2023-01-27 17:23:27 UTC
Description:
Am unable to reconcile a sumif result to result seen when range is manually filtered and summed.

Steps to Reproduce:
1. Create table (pivot by date) in sheet 1
2. In sheet 2 create a sumif with date as criteria (cell reference to cell with same date, in this instance).

Actual Results:
sumif total < manual sum

Expected Results:
sumif total = manual sum


Reproducible: Always


User Profile Reset: No

Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: no

Version: 7.4.5.1 (x64) / LibreOffice Community
Build ID: 9c0871452b3918c1019dde9bfac75448afc4b57f
CPU threads: 24; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 1 Roberto 2023-01-27 17:25:23 UTC
Created attachment 184963 [details]
screenshot

screenshot
Comment 2 Mike Kaganski 2023-01-27 18:10:01 UTC
The screenshot makes it rather tricky to check, e.g., contents of Log.A530, to see if it contains any time in addition to the date. And indeed, the value of '2023-01-26' is different from '2023-01-26 01:15', and SUMIF, which only has one specific value (macroLvl.B30) as its criterion, would match one, but not the other, despite the *look* of both would be the same when using a 'DD/MM/YY' format string.

But it could be something different, and as said, screenshots are not the best thing to analyze problems.
Comment 3 Mike Kaganski 2023-01-27 18:11:02 UTC
(In reply to Mike Kaganski from comment #2)
> ... contents of Log.A530, ...

Indeed, "contents of Log.B530" was meant.
Comment 4 raal 2023-01-27 23:54:43 UTC
please attach test file. Thank you.
Comment 5 Roberto 2023-01-28 02:12:49 UTC
Created attachment 184977 [details]
test spreadsheet

testfile
Comment 6 Roberto 2023-01-28 02:14:02 UTC
Created attachment 184978 [details]
screenshot

There is no additional parameters to the range lookup column that I am aware of.
Comment 7 QA Administrators 2023-01-28 03:25:34 UTC Comment hidden (obsolete)
Comment 8 Mike Kaganski 2023-01-28 06:07:27 UTC
(In reply to Roberto from comment #5)

And what is the expected result? You didn't specify what you expect.
Assuming that you expect in macroLvl.C3:C4 the same values as in Log.E25 and Log.E50:

In the attached document, cell B41 has "01/25/23", and corresponding amount is 335.
Comment 9 Roberto 2023-01-28 16:31:48 UTC
You are correct. B41 should be 1/26/23.

I don't see a resolution flag for "user error" or I'd add it. My sincere apologies.