https://bugs.documentfoundation.org/show_bug.cgi?id=162971
--- Comment #4 from [email protected] --- Created attachment 209085 --> https://bugs.documentfoundation.org/attachment.cgi?id=209085&action=edit Pivot table before and after Data > Sort (descending) Reproduced the main issue. 1. Source data A1:B5 (Name/Amount: Ann 10, Bob 30, Cat 20, Dan 5). 2. Insert > Pivot Table from the current selection; Name as row field, Sum - Amount as data field. The output on a new sheet ends with the Total Result row (65). 3. Clicked B3 inside the pivot table and chose Data > Sort. The range was extended to A1:B6, including the total row. 4. Sort Key 1 = "Sum - Amount", Descending, OK. Result: the Total Result row (65) moves to row 2, directly under the header, i.e. it is sorted like a data row. Not reproduced: in this build "Range contains column labels" was already checked in the Sort dialog, so the header row stayed in place. I used Data > Sort as in the steps; I did not test sorting from the context menu or pivot tables with more fields. LibreOffice: Version: 26.8.0.3 (X86_64) Build ID: bce0998afefdbc355585ca324285661a2170ba77 CPU threads: 20; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Raster; VCL: win Locale: zh-CN (zh_CN); UI: zh-CN Calc: CL threaded -- You are receiving this mail because: You are the assignee for the bug.
