# [Libreoffice-bugs] [Bug 103269] New: Pivot table reports identical values on column of same nth cells of values after it is sorted ascending and descending.

`https://bugs.documentfoundation.org/show_bug.cgi?id=103269`
```
Bug ID: 103269
Summary: Pivot table reports identical values on column of
same nth cells of  values after it is sorted ascending
and descending.
Product: LibreOffice
Version: 5.2.1.2 release
Hardware: x86-64 (AMD64)
OS: Windows (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Calc
Assignee: libreoffice-bugs@lists.freedesktop.org
Reporter: karmstrong6...@att.net

Description:
If I select the first nth cells in a column(s) after an ascending sort, the
pivot table gives the same results for a pivot on the same number of cells
after a descending sort, which is incorrect for the values in the column,
The peculiarity is that if I select cells that are more than half the number
cells in the column I get a correct calculation(i.e if there are 50 cells with
values in an ascending column , if I select the first 38 cells, do a pivot,
then resort descending and select the first 38 cells, the calculation is
correct.)

Steps to Reproduce:
1.Create spreadsheet with labeled column of length A filled with random
values.(If using rand functions be sure to copy and paste for text and values
only.)
2.Sort the column ascending
3.Select the first<A/2 cells in column.
4. do pivot for whatever stat
5. Sort the column descending
6. select the same first number of cells <A/2
7. do pivot for same stats
8. Result is identical
9. If the lengths of the sected cells differ by just 1 cell, the expected
correct value is reported for the second pivot.

Actual Results:
See above

Expected Results:
see above

Reproducible: Always

User Profile Reset: No

If you want I can send a sample spreadsheet.

User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/53.0.2785.143 Safari/537.36

--
You are receiving this mail because:
You are the assignee for the bug.```
```_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
```