Bug 49095

Summary: PivotTable sort drop down should hide members that are filtered by another field.
Product: LibreOffice Reporter: pharmankur <pharmankur>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: enhancement CC: jbfaure, libo2016
Priority: medium    
Version: 3.5.2 release   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 103381    
Attachments: on 1st sheet data is created, On 2nd sheet pivot table is present
on 1st sheet data is created, On 2nd sheet pivot table is present
on 1st sheet data is created, On 2nd sheet pivot table is present
Pivottable bug image 1 out of 2
Pivottable bug image 1 out of 2 (where error occurs)

Description pharmankur 2012-04-24 00:42:43 UTC
Created attachment 60512 [details]
on 1st sheet data is created, On 2nd sheet pivot table is present

When a pivot table have multiple levels of data, selecting the Higher level of data should show appropriate & applicable options only, while selecting lower (dependent) level of data

Find attached the spreadsheet file with pivot data to understand my point.

There I have created a dummy data for a department store. having headings -->

Counter Position	Item Type	Item Name	Qty

Possible 'Counter Position' are --> Main , Display , Inside
Possible 'Item Type' are --> Fruit, stationary, Vegetable, Crockery

Possible 'Counter Position' wise 'Item Types' are;
Main --> Fruit, stationary, Vegetable
Display --> stationary, Vegetable, Crockery
Inside --> stationary, Crockery

----------------------------------------------------------------------
(What should happen --)
Now, When I make the pivot table of this data & when I first select Counter Position -- "Main" (From drop down box) ; & then I move further to select Item Type (drop down box) ; I should see only the 'Item Type' options possible with my previous selection ("Main") i.e. I should see only the options (In drop down box) "Fruit, stationary, Vegetable" 

(What is happening --)
On the contrary currently I am seeing all the options (In drop down box) ... Fruit, stationary, Vegetable, Crockery
But "Crockery" is non applicable option under "Main" thus should not be visible in drop down. 

As a result, if by mistake I select option "Crockery" & deselect all other options (under "Main") All of my Pivot table collapses & it is not recovered !
-----------------------------------------------------------------------

Even in pivot table in office 2007, you get to see only applicable options based on your preselected option.
The bug is not very annoying but definitely its illogical & has to be removed if we want perfection in Calc.
Comment 1 Nino 2012-04-25 08:36:35 UTC
@ pharmankur : 

You did not enter a valid data field to your Pivot Table Layout.

If you add a valid data field (e.g. Sum - Qty), it works as expected, at least in my installation (3.5.3.1/Linux x86).

Could you please try once again with a valid data field and reopen the bug if you find it still does not work as desired.

So the bug you described seems to be rather a usage problem. But ok, one might consider to catch empty data field with a warning.
Comment 2 pharmankur 2012-04-27 08:13:55 UTC
Created attachment 60688 [details]
on 1st sheet data is created, On 2nd sheet pivot table is present

@ nino
Data is very much valid, just pivot table layout has to be adjusted which i have updated in replaced Pivote_Table_bug.xls
 will also post the screenshots which will explain the issue in better way ...
Comment 3 pharmankur 2012-04-27 08:18:52 UTC
Created attachment 60689 [details]
on 1st sheet data is created, On 2nd sheet pivot table is present
Comment 4 pharmankur 2012-04-27 08:30:19 UTC
Created attachment 60690 [details]
Pivottable bug image 1 out of 2
Comment 5 pharmankur 2012-04-27 08:31:03 UTC
Created attachment 60691 [details]
Pivottable bug image 1 out of 2 (where error occurs)
Comment 6 Nino 2012-04-27 10:49:29 UTC
Ok, now I see what you mean. Let me summarize:

1) A "secondary" selection list should be refreshed to reflect only actually selectable items (depending on other selections).

2) A selection of no items should not lead to collapse of the whole table.
Comment 7 Kohei Yoshida 2012-07-09 15:14:57 UTC
The current behavior is a limitation of the current implementation, and this is technically an enhancement request.  Marking it as such.