Microsoft KB Archive/214336

= XL2000: Grouping a Field in a PivotTable Changes Other PivotTable =

Article ID: 214336

Article Last Modified on 9/27/2003

-

APPLIES TO


 * Microsoft Excel 2000 Standard Edition

-



This article was previously published under Q214336





SYMPTOMS
In Microsoft Excel 2000, if you group or ungroup a field in a PivotTable, the same field may also be grouped or ungrouped in another PivotTable.



CAUSE
This problem occurs if one PivotTable uses another PivotTable as the source of its data.

Specifically, this problem occurs because when you create a PivotTable that uses another PivotTable as the source of its data, both PivotTables share a common PivotTable memory cache. This cache contains not only the data used by both PivotTables, but also the settings for the PivotTables, including grouping settings. As a result, when you group or ungroup a field in one PivotTable, the same field is grouped or ungrouped in the other PivotTable.



WORKAROUND
To prevent this problem from occurring, when you create a new PivotTable, do not use another PivotTable as the source of its data. To avoid this problem, follow these steps:  On the Data menu, click PivotTable and PivotChart Report. In the PivotTable and PivotChart Wizard - Step 1 of 3 dialog box, select one of the following three option buttons  Microsoft Excel List or Database External Data Source Multiple Consolidation Ranges</ul>

depending on the location of the source data.</li> Click Next, and then proceed through the remainder of the PivotTable creation process.</li></ol>

If you have already created the new PivotTable, you must delete the existing PivotTable, and then create another new PivotTable using the steps above.

Using this workaround will increase the size of your workbook, because each PivotTable will have its own PivotTable memory cache.

If you create a PivotTable that uses the same source data as another PivotTable, but you do not use the other PivotTable as the source of the data, you may receive an error message similar to the following:

Your new PivotTable will use less memory if you base it on your existing PivotTable [ ] ! , which was created from the same source data. Do you want your new PivotTable to be based on the same data as your existing PivotTable?

If you click Yes, the new PivotTable uses the old PivotTable as the source of its data, and the problem described in the "Symptoms" section of this article will occur. If you click No, the new PivotTable uses its own PivotTable memory cache, and the problem described in the "Symptoms" section of this article will not occur.

<div class="moreinformation_section">

MORE INFORMATION
In Microsoft Excel, you can group numeric fields in a PivotTable by different intervals of time, for example: seconds, minutes, hours, days, months, quarters, and years.

To group a field, follow these steps:
 * 1) Select a cell in the field in the PivotTable that you want to group.

NOTE: Do not select the gray button for the field.
 * 1) On the Data menu, point to Group and Outline, and then click Group.
 * 2) Click OK.

The selected field in the PivotTable is grouped using the interval(s) you selected.

You can ungroup a field by selecting a cell in the field, clicking the Data menu, pointing to Group and Outline, and then clicking Ungroup.

The following steps demonstrate the problem described in the "Symptoms" section of this article: <ol>  In Microsoft Excel, create a new workbook. In Sheet1, enter the following data: <pre class="fixed_text">  A1: Start    B1: Sales A2: 1/1/99  B2: 4 A3: 2/1/99  B3: 3 A4: 3/1/99  B3: 2 A4: 4/1/99  B4: 1 </li> Select cell A1. On the Data menu, click PivotTable and PivotChart Report.</li> In the PivotTable and PivotChart Wizard dialog box, follow these steps:

<ol style="list-style-type: lower-alpha;"> In step 1 of the wizard, click Next.</li> In step 2 of the wizard, click Next.</li> In step 3 of the wizard, click Layout, drag the Start field to the ROW area, and then drag the Sales field to the DATA area. Click OK.</li> In step 3 of the wizard, click the Existing Worksheet button, and then type Sheet2!A1 in the edit box.</li> Click Finish.</li></ol>

A new PivotTable appears in Sheet2.</li> Switch to Sheet3, and then select cell A1.</li> On the Data menu, click PivotTable and PivotChart Report.</li> In the PivotTable and PivotChart Wizard dialog box, follow these steps:

<ol style="list-style-type: lower-alpha;"> In step 1 of the wizard, select the Another PivotTable or PivotChart option button, and then click Next.</li> In step 2 of the wizard, select the PivotTable you created in step 3, and then click Next.</li> In step 3 of the wizard, click Layout and drag the Start field to the ROW area, and then drag the Sales field to the DATA area. Click OK.</li> Click Finish.</li></ol>

Another new PivotTable appears in Sheet3.</li> <li>Select cell A4 in Sheet3. On the Data menu, point to Group and Outline, and then click Group.</li> <li>In the By list, select Months, and then click OK.

Note that the PivotTable in Sheet3 is now grouped by month (Jan, Feb, Mar, and so on).</li> <li>Switch to Sheet2.</li></ol>

The PivotTable in Sheet2 is also grouped by month, even though you did not group the field in the PivotTable. This occurs because the two PivotTables share a common PivotTable memory cache.

Additional query words: XL2000

Keywords: kbprb KB214336

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.