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.
Open the report web page <https://bugs.documentfoundation.org/show_bug.cgi?id=162595> and use the "Add an attachment" link to add a sample spreadsheet that shows the problem. Please keep in mind that it will be publicly available.
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.
https://help.libreoffice.org/6.2/en-US/text/scalc/guide/datapilot_edittable.html#:~:text=you%20can%20assign%20custom%20display%20names%20to%20fields%2C%20field%20members%2C%20subtotals%20(with%20some%20restrictions)%2C%20and%20grand%20totals%20inside%20pivot%20tables.%20a%20custom%20display%20name%20is%20assigned%20to%20an%20item%20by%20overwriting%20the%20original%20name%20with%20another%20name.
@Miguel, Have you actually tried to rename a field in a PT? Either the documentation is incorrect, or something is wrong (i.e. bug).
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.
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]?
@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.
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.
@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.
(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".
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.
*** Bug 163035 has been marked as a duplicate of this bug. ***
Carrying the dependency from the dupe bug.