Bug 145291 - CALC evaluation of ad hoc labels fails when a CELL within the label array is included in the formula
Summary: CALC evaluation of ad hoc labels fails when a CELL within the label array is ...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.1.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-24 08:33 UTC by Colin
Modified: 2022-11-18 03:37 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Simple example sheet (15.26 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-10-24 08:35 UTC, Colin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Colin 2021-10-24 08:33:28 UTC
Description:
There appear to be two impacts from this situation.

The first scenario was only apparent when the sheet was initially created and the original formula in F5 was;

  =E5/SUM('C')

which was replicated for the entire data column and produced validated results.

I considered it unusual that the result in F2 was precisely ONE.

I changed A1 and whilst all the other columns reflected that change, Column F and the result in F2 remained unchanged.

I then filtered three days from Column C and whilst the rows were hidden the result in F2 was still ONE.

I then changed the formula in F5 to include the ad hoc label ‘B’ instead of ‘C’ and replicated that for the entire column

F2 and the entire Column F changed to reflect the amended formula and amendments to A1 affected all appropriate cells.

Subsequently, I attempted to change the formula in F5 back to the original ad hoc label ‘C’ only to discover that the system now considers label ‘C’ to be ZERO and produces the requisite #DIV/0! Error.

Also, a new cell E1 with the simple formula =SUM(‘C’) returns ZERO – What happened to the ad hoc label?

Steps to Reproduce:
To demonstrate that it originally provided a result it will be necessary to create a new version of what I have attached and ensure that the formula in F5 is initially created to refer to label C
=E5/SUM(‘C’)  and then replicate the formula - LO has been observed to automatically insert the apostrophes
Observe that F2 = 1
Edit A1 to 9
Observe F2 remains at 1 and column F is unchanged
Filter out three days from column C – label ‘A’
Observe F2 remains 1
Edit F5 to read =SUM(‘B’)
Observe the changes
Attempt to amend F5 to the original =SUM(‘C’)
Observe the destruction

Actual Results:
Case 1 appears to evaluate the array but subsequently doesn't reflect any changes to values.
Case 2 destroys the ad hoc label and returns #DIV/0! error

Expected Results:
Regular assessment of the values in the source cells and ad hoc label array


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Version: 7.2.1.2 (x64) / LibreOffice Community
Build ID: 87b77fad49947c1441b67c559c339af8f3517e22
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: sv-SE (en_GB); UI: en-GB
Calc: threaded
Comment 1 Colin 2021-10-24 08:35:38 UTC
Created attachment 175892 [details]
Simple example sheet

Remember: The instructions are to first create the sheet yourself using this as an example as one error is "first run only" in that it can never be replicated once the formula has been changed
Comment 2 Colin 2021-10-24 08:41:50 UTC
(In reply to Colin from comment #0)

> Edit F5 to read =SUM(‘B’)
> Observe the changes
> Attempt to amend F5 to the original =SUM(‘C’)
> Observe the destruction
> 
After editing F5 to SUM('B')then make a few changes to A1 and filter the days to demonstrate that column F and F2 are now responding appropriately
Comment 3 Buovjaga 2022-11-17 13:39:56 UTC
(In reply to Colin from comment #0)
> Description:
> There appear to be two impacts from this situation.
> 
> The first scenario was only apparent when the sheet was initially created
> and the original formula in F5 was;
> 
>   =E5/SUM('C')
> 
> which was replicated for the entire data column and produced validated
> results.
> 
> I considered it unusual that the result in F2 was precisely ONE.
> 
> I changed A1 and whilst all the other columns reflected that change, Column
> F and the result in F2 remained unchanged.
> 
> I then filtered three days from Column C and whilst the rows were hidden the
> result in F2 was still ONE.
> 
> I then changed the formula in F5 to include the ad hoc label ‘B’ instead of
> ‘C’ and replicated that for the entire column
> 
> F2 and the entire Column F changed to reflect the amended formula and
> amendments to A1 affected all appropriate cells.
> 
> Subsequently, I attempted to change the formula in F5 back to the original
> ad hoc label ‘C’ only to discover that the system now considers label ‘C’ to
> be ZERO and produces the requisite #DIV/0! Error.
> 
> Also, a new cell E1 with the simple formula =SUM(‘C’) returns ZERO – What
> happened to the ad hoc label?
> 
> Steps to Reproduce:
> To demonstrate that it originally provided a result it will be necessary to
> create a new version of what I have attached and ensure that the formula in
> F5 is initially created to refer to label C
> =E5/SUM(‘C’)  and then replicate the formula - LO has been observed to
> automatically insert the apostrophes

If I fill the formula, I get these:

=E6/SUM(#NAME?$E5)
Comment 4 Colin 2022-11-17 16:27:16 UTC
(In reply to Buovjaga from comment #3)
> (In reply to Colin from comment #0)

> 
> If I fill the formula, I get these:
> 
> =E6/SUM(#NAME?$E5)

I'm Not sure whether you're telling me that there's a third manifestation (are you validating the same Win10 release) or it's behaving as planned and rejecting some error I have created myself.
Comment 5 Buovjaga 2022-11-17 16:31:19 UTC
(In reply to Colin from comment #4)
> (In reply to Buovjaga from comment #3)
> > (In reply to Colin from comment #0)
> 
> > 
> > If I fill the formula, I get these:
> > 
> > =E6/SUM(#NAME?$E5)
> 
> I'm Not sure whether you're telling me that there's a third manifestation
> (are you validating the same Win10 release) or it's behaving as planned and
> rejecting some error I have created myself.

I was just informing you and others that I tried to reproduce the problem, but was stumbling immediately in the first step. For you it does not behave like that? I tested on Linux.
Comment 6 Colin 2022-11-17 19:00:18 UTC
(In reply to Buovjaga from comment #5)
> (In reply to Colin from comment #4)
> > (In reply to Buovjaga from comment #3)
> > > (In reply to Colin from comment #0)
> > 
> 
> I was just informing you and others that I tried to reproduce the problem,
> but was stumbling immediately in the first step. For you it does not behave
> like that? I tested on Linux.

I was at least able to complete the procedure once but the moment I edited the formula to modify the label it failed. Probably just a difference exacerbated by the operating system variants.
I'm on this 
Version: 7.3.6.2 (x64) / LibreOffice Community
Build ID: c28ca90fd6e1a19e189fc16c05f8f8924961e12e
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: sv-SE (en_GB); UI: en-GB
Calc: threaded
                    now so perhaps I should revisit and log any differences