Bug 162595 - Generated Titles of Pivot Table Should Be Editable
Summary: Generated Titles of Pivot Table Should Be Editable
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 163035 (view as bug list)
Depends on: 129088
Blocks: Pivot-Table
  Show dependency treegraph
 
Reported: 2024-08-23 13:13 UTC by roman.roehrig
Modified: 2024-09-18 22:59 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample Spreadsheet with a small Pivot Table (11.41 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-08-23 14:49 UTC, roman.roehrig
Details

Note You need to log in before you can comment on or make changes to this bug.
Description roman.roehrig 2024-08-23 13:13:22 UTC
Description:
While working with Pivot Tables, I was not able to edit the genereted title of a column. As a result, I could not use Calc for the task I had to complete, because the generated title was wrong semantically.

Steps to Reproduce:
1. Create a Pivot Table out of some sample data.

Example for sample data:

|Number|Room Number|m²|
|------|-----------|--|
|1     |Living Room|30|
|2     |Bedroom    |25|
|3     |Closet     |12|

2. Configure the Pivot Table as follows:

Drag the buttons for "Number" and "Room Number" to the Row Fields area. Drag the button for "m²" to the Data Fields area.

3. The resulting Pivot Table should be as follows:

|Number      |Room Number|Sum - m²|
|------------|-----------|--------|
|1           |Living Room|30      |
|2           |Bedroom    |25      |
|3           |Closet     |12      |
|Sum - Result|           |67      |

4. The title "Sum - m2" ist wrong. The values in this column aren't sums. The one an only sum in this table is the value in the results row. Try to rename the title "Sum - m2" to "m2" or "Area - m2". Calc will refuse to rename the title.

Actual Results:
The genereated title for that column, which contains the values to be summed up in the very last row, is "Sum", which is wrong.

Expected Results:
One should be able to rename the title of the row.


Reproducible: Always


User Profile Reset: No

Additional Info:
Possibly compare with with a Pivot Table in Excel. The generated titles are similar (wrong), but you are able to rename them.
Comment 1 ady 2024-08-23 14:31:19 UTC Comment hidden (obsolete)
Comment 2 roman.roehrig 2024-08-23 14:49:31 UTC
Created attachment 195985 [details]
Sample Spreadsheet with a small Pivot Table

The Pivot Table in the Sample Spreadsheet has a generated title in C1, which is not correct, because the values in C2, C3 and C4 are not sums. Although, Calc refuses any attempt to rename the title in C1.

For comparison: The genereated title of the result row is editable. This should be possible for all generated titles.
Comment 4 ady 2024-08-23 21:53:44 UTC
@Miguel,

Have you actually tried to rename a field in a PT?

Either the documentation is incorrect, or something is wrong (i.e. bug).
Comment 5 m_a_riosv 2024-08-23 22:05:34 UTC
I can do as explained in help
"
You can assign custom display names to fields, field members, subtotals (with some restrictions), and grand totals inside pivot tables. A custom display name is assigned to an item by overwriting the original name with another name.
"
It can be done except for data fields.

So, a valid request for data fields.

BTW if they are unique values, you can put it in the row fields.
Comment 6 ady 2024-08-23 22:24:36 UTC
In attachment 195985 [details]...

If you double-click on cell C1 in order to change "Summe - m²" to something else, you will get a message stating that you cannot change this part of the pivot table.

If you open the Properties dialog for the PT and you try to overwrite any name of any field (as suggested by the Help content), there is no way to do it. The only thing that seems close to that is the area in the sub-dialog that shows "Name: m²", but that is not editable (either).

Having said that, the sample file in the Help content allows to modify the names. So, something is different; I just don't know what that is.

@roman,

Is there some kind of Protection somewhere in attachment 195985 [details]?
Comment 7 roman.roehrig 2024-08-24 05:11:40 UTC
@ady

No, I can’t imagine what kind of protection that could be. I created the sample file from a new, blank file and typed the sample data manually from scratch (without copy and paste). Then I saved the sample file with default settings.
Comment 8 ady 2024-08-24 10:15:09 UTC
I can also create such PT, and I also cannot change the name of the fields.

So, there must be some condition that makes the fields editable in the sample "pivot.ods" file in the Help content, but not editable in new PT.

IMHO, the request is valid, and the documentation should be improved anyway.
Comment 9 m_a_riosv 2024-08-24 20:17:07 UTC
@ady, the edition is not by double click, only in the sheet going to the cell to modify.

The data fields are not included as modifiable. I guess the reason for detailing which are modifiable in help comment #5.

I think the reason because they are not modifiable, is they have a composed named between the operation and the field name.
Comment 10 ady 2024-08-24 23:51:03 UTC
(In reply to m_a_riosv from comment #9)
> @ady, the edition is not by double click, only in the sheet going to the
> cell to modify.

Sorry about that. You are correct; "editing the cell" it is.

> 
> The data fields are not included as modifiable. I guess the reason for
> detailing which are modifiable in help comment #5.

That's the part that is not clear:
"You can assign custom display names to fields"

...followed by:
"A custom display name is assigned to an item by overwriting the original name with another name"

How exactly could users overwrite the original name of a field? It does show the name of the field, but that part of the dialog is not editable. Although the Help content does not explain it (letting users assume that the action can be performed within the PT properties dialog itself, which is not true), we could _try_ by editing the relevant cells in the PT itself, as we have mentioned in prior comments in this report (but, again, not based on the current Help content).

> 
> I think the reason because they are not modifiable, is they have a composed
> named between the operation and the field name.

But the Help seems to imply that they are editable; except that it doesn't really say how, and the PT properties dialog does not allow it, anywhere.

Now, let's assume that we could edit the name of the fields by editing the cells themselves. The same online Help page allows to download a sample "pivot.ods" file, and in that file I am able to edit the relevant cell and change its name, which is then shown in the PT properties dialog – the information about "Name:" in the dialog shows the new name of the cell. But...

The problem is that if I build a PT by myself on a new file, when I attempt to modify the cell containing the name of the field, the modification is not accepted, as it says that changing the field name is not allowed.

So, again, the Help page seems to imply that fields can be renamed (although not how to do it), and the accompanying file allows to do so, but I cannot replicate the same behavior by myself.

IDK what exactly is special about "pivot.ods", or about attachment 195985 [details], but they do not behave in the same way. I cannot rename a field on a PT in attachment 195985 [details], but I can in "pivot.ods".
Comment 11 roman.roehrig 2024-08-26 07:20:00 UTC
Regardless of the contradictions between the documentation and the example file “pivot.ods”, I would like to point out that the current behavior is a show stopper for me.

At my work, we have a workflow where a lot of data exported from other programs needs to be filtered and displayed using pivot tables. As the documents created from this are also submitted to authorities as part of approval procedures, the table headings must be correct. Otherwise, in the worst case scenario, the authorities would reject the documents. We currently do this with Excel, but we would love to be able to work without Microsoft Office at some point.

To come to the bottom line: It is not the contradictions in the documentation, but the actual behavior of the program that is the decisive point. And care should be taken to ensure that, in case of doubt, the user should have the power of decision.
Comment 12 m_a_riosv 2024-09-18 22:49:44 UTC
*** Bug 163035 has been marked as a duplicate of this bug. ***
Comment 13 Eyal Rozenberg 2024-09-18 22:59:00 UTC
Carrying the dependency from the dupe bug.