Bug 78486 - Feature Request: Add Calculated Field in PIVOT TABLE
Summary: Feature Request: Add Calculated Field in PIVOT TABLE
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Balázs Varga
URL: https://ask.libreoffice.org/t/calcula...
Whiteboard: target:26.8.0
Keywords:
: 126858 127380 (view as bug list)
Depends on:
Blocks: Pivot-Table
  Show dependency treegraph
 
Reported: 2014-05-09 12:47 UTC by Copeliner
Modified: 2026-04-23 07:01 UTC (History)
21 users (show)

See Also:
Crash report or crash signature:


Attachments
Calculated Field Example and Design Suggestion (55.79 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-12-02 15:27 UTC, Kevin Suo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Copeliner 2014-05-09 12:47:03 UTC
We warmly welcome,

Please help in adding to LibreOffice 4.3 or subsequent versions such thing as a calculated field in a PivotTable.
How and to whom would pull such a request, on a forum written something about masters Kohei Yoshida Markus Mohrhard or whether it is the right person?
I am really missing the functionality that exists in Office, basically I have a feeling that this area is a little less developed.
For any information in advance thank you very much.
Comment 1 Kevin Suo 2014-05-31 15:56:45 UTC
You should not mark your own bug as new, as it needs further investigate.

Set to UNCONFIRMED.
Comment 2 Jacques Guilleron 2014-06-09 13:18:44 UTC
Hi Copeliner,

I see the lack and set importance for this report as enhanbcement and Platform to All.

Regards,

Jacques
Comment 3 Calc_addict 2015-01-30 15:11:41 UTC
Hi,

I am also really missing the functionnality "calculated field" in a pivot table.
I am using Excel a lot at the office, and each time I build a pivot table (on big data files), I add many calculated fields. It is versatile, easy to use and make the pivot table a more powerful calculating tool.
Now, I have to switch to LO and I really appreciate working with Calc except that I can not add any calculated field in the pivot table. I have to add columns outside the pivot table to let perform the calculations that should be done inside it. This way, this specific tool is less powerfull and flexible.
I have searched a lot on forums but did not find any solution.

Is there an extension available to add this functionnality for the pivot tables or would it be possible that someone develops such an extension?

Thanks a lot,
Comment 4 Calc_addict 2015-01-30 15:13:02 UTC Comment hidden (obsolete)
Comment 5 Vincent 2016-01-19 09:38:11 UTC
Hi,

I also would really like this functionality implemented.
Is there a way to vote this up?
The GETPIVOTDATA function does not what I need (or I am unable to use it) and a suggestion at the question list for manipulating the data before the pivot table is made does not work either.

A simple calculated field works, but does not move with an changed of the pivot table.

I have asked the question here:
https://ask.libreoffice.org/en/question/62979/calculated-fields-in-a-pivot-table/

Still not available in LibreOffice 5.
I would be happy to contribute in anyway on request.
At this point setting up a development environment maybe a step to far, but I am willing to try with the proper help.

thank you
Comment 6 Kevin Suo 2016-12-01 11:27:22 UTC
Changed title summary and added to "Pivot-Table" meta bug.
Comment 7 Cor Nouws 2016-12-02 13:52:48 UTC
So that should be in addition to what currently is offered in the dialog "Data Field" that opens when one double clicks a data field in the layout part of the design window?
Comment 8 Kevin Suo 2016-12-02 15:27:32 UTC
Created attachment 129252 [details]
Calculated Field Example and Design Suggestion

I have prepared the attached example spreadsheet file to show what a calculated field is. 
I also suggested a simple layout of the dialogs.
Comment 9 Kevin Suo 2016-12-02 15:29:12 UTC
(In reply to Kevin Suo from comment #8)
Anyone who is interested in this feature please complement the design suggestion.
Comment 10 simone 2017-10-20 21:28:53 UTC
Hi to all,
I thinks it's necessary the functionality "calculated field" in a pivot table.
How can we do to suggest to do this funcionality to developers?


Other functionality in pivot ( less import) are the different layout of pivot, like you can do in Excel.

Thanks
simone
Comment 11 carles 2017-11-29 09:11:48 UTC
Hi,

I also think that a new functionality to create a "calculated field" in a pivot table will be very useful.

I think it's a great suggestion to developers.

Thanks a lot,
Comment 12 Phil 2019-05-31 09:02:43 UTC
It'll be regretful that one can compute a discrete Fourier transform in the upcoming LO 6.3 (tdf 74664), but not a simple weight of a field in a pivot table (example salesValues/sum of sales Values)

Consider seeing:
https://www.youtube.com/watch?v=cTl3rPLP1cE
or
https://www.excelcampus.com/pivot-tables/average-daily-total-calculation/


Additionnaly, I do not see this MAJOR missing feature reported in https://wiki.documentfoundation.org/Feature_Comparison:_LibreOffice_-_Microsoft_Office

P.S. This functionality already exist in Excel 2000
Comment 13 Phil 2019-05-31 09:06:30 UTC Comment hidden (noise)
Comment 14 m_a_riosv 2019-08-12 22:25:22 UTC
*** Bug 126858 has been marked as a duplicate of this bug. ***
Comment 15 m_a_riosv 2019-09-05 21:52:01 UTC
*** Bug 127380 has been marked as a duplicate of this bug. ***
Comment 16 m_a_riosv 2019-09-05 21:53:11 UTC
*** Bug 126858 has been marked as a duplicate of this bug. ***
Comment 17 johnks 2020-07-20 16:59:53 UTC Comment hidden (noise)
Comment 18 Armando Soto Baeza 2022-02-06 19:33:32 UTC Comment hidden (me-too)
Comment 19 Acroneuria 2022-07-25 16:19:42 UTC Comment hidden (me-too)
Comment 20 Biz Infograph 2023-02-03 12:40:47 UTC Comment hidden (spam)
Comment 21 syednizamudeen@gmail.com 2023-04-10 16:57:58 UTC Comment hidden (me-too)
Comment 22 jindra 2023-11-04 12:41:55 UTC Comment hidden (me-too)
Comment 23 flywire 2025-04-26 10:13:27 UTC
Functionality is only convenient Financial Year reporting (eg July to June does not follow calendar year).
Comment 24 Commit Notification 2026-03-13 07:06:13 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6a69c9e2ac1a2da9bb43150ee12008e913de2a60

tdf#78486 sc: add pivot table calculated field support (core + OOXML)

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 25 Commit Notification 2026-03-13 07:07:20 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/cc86c42883944bf0d8ffab3ea9da1bc5d6e4db1b

tdf#78486: sc handle ScDPGroupTableData dimension layout for calc fields

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 26 Commit Notification 2026-03-13 07:07:22 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0467a68ff93b4464b87869e8be3ca123a5d0a3f8

tdf#78486 sc: add calculated field dialog for pivot tables

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 27 Commit Notification 2026-03-13 07:07:25 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8c8e52feebcc2f48c2212351e783015021281b78

tdf#78486: sc pivot calculated fields, group field unit test

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 28 Commit Notification 2026-03-13 07:08:29 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4f1bebee397ffe5ddc909d50ffe287d2521529bf

tdf#78486 sc: pivot table calculated field (odf import/export)

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 29 Commit Notification 2026-03-13 07:08:32 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/fa68d8f392daba66bbbf99683b48abee1a57e1fa

tdf#78486 sc: add pivot table calculated field support (xlsb)

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 30 Commit Notification 2026-03-16 21:56:31 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f1e59c09b28cab61c8b17570a4ab08afbc097d26

tdf#78486: sc pivot calculated fields, change weld entry to weld

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 31 Commit Notification 2026-03-20 22:04:55 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5eef505c166915375527f420033c42b44036d16b

Related tdf#78486: fix wrong formula parsing because we only

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 32 Commit Notification 2026-04-02 07:39:59 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f77b4a543fc845969c7b6bd80de9dee6cca39cc9

Related tdf#78486: fix crash when calculated field is the only

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 33 Commit Notification 2026-04-06 07:56:40 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/abc59929cb7d6584b4c4389d957a6217bb45ef49

Related tdf#78486: always use SUM aggregation for calculated field

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 34 Commit Notification 2026-04-06 07:57:43 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8d2e7fd150ad74429648077319f4696b79174067

Related tdf#78486: recompile calculated field formulas against

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 35 Commit Notification 2026-04-23 07:01:15 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2cd19ed51d75709ce74cf52e5693b929ab0613be

Related tdf#78486: propagate errors through calculated field references

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.