https://bugs.documentfoundation.org/show_bug.cgi?id=89186
Bug ID: 89186
Summary: GETPIVOTDATA gives #REF! with "Field n / Item n"
syntax.
Product: LibreOffice
Version: unspecified
Hardware: Other
OS: Windows (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: LibreOffice
Assignee: [email protected]
Reporter: [email protected]
Created attachment 113189
--> https://bugs.documentfoundation.org/attachment.cgi?id=113189&action=edit
Brand new LO spreadsheet with illustrations.
GETPIVOTDATA function gives bad #REF! result using "Field n / Item n" syntax.
Using LO Version: 4.3.5.2
Intel Core i5-4200U CPU x64-based processor
Windows 8.1
GETPIVOTDATA does not function as documented, according to LibreOffice Calc
Help:
You should not get “#REF!” ("Error: Not a valid reference") as long as "the
pivot table contains only a single result value that fulfills all of the
constraints, or a subtotal result that summarizes all matching values".
I am taking "constraints" to include constraints applied using the "Field n /
Item n" syntax. Or if "constraints" is referring to the "constraints" syntax
branch of the Help text, then I'm talking about the "Field n / Item n" syntax
branch.
Works OK on Apache OpenOffice 4.1.0
Start with fresh Calc file. Enter the following:
Col1 Col2 col3
bge 47 12
tpx 1.7 1.37
mrz 42 8
tpx 1.7 88.68
mrz 33 12.01
Start a Pivot Table on the above. Specify Row Fields Col1 and Col2 in that
order; Data Field of col3. Make it produce the Pivot Table starting at A1 on a
new sheet.
GETPIVOTDATA("Col3",$A$1,"Col1","bge") yields "#REF!" - should yield 12.
You should get the result 12 because there is only one "bge" row in the source
data, and of course only one "bge" row in the Pivot Table.
GETPIVOTDATA("Col3",$A$1,"Col1","bge","Col2",47) yields 12 as it should.
But you should not have to specify the Col2 field, which is not required to pin
down the qualifying row.
Same approach but using Col1="mrz" requires both Col1 and Col2 to work; no
complaint about that.
Same approach but using Col1="tpx" with Col2 unspecified yields "#REF!" -
should yield 90.05.
This is because, although there are more than 1 source rows, they all have the
same Col2 value and thus summarize into a single Pivot Table row.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs