Quantcast
Channel: Excel 2010 Pivot Table: How can I expand/collapse a subset of records beneath a distinct set of records? - Super User
Viewing all articles
Browse latest Browse all 3

Excel 2010 Pivot Table: How can I expand/collapse a subset of records beneath a distinct set of records?

$
0
0

Consider the following set of data in a table called Employee:

Name   Sup   Q1Sales  Q2Sales  Q1Atte  Q2AtteJohn   Joe   Good     Bad      Bad     BadMary   Joe   Good     Bad      Bad     BadBob    Sara  Bad      Good     Bad     BadMary   Sara  Bad      Good     Bad     BadEd     Joe   Good     Good     Bad     GoodSally  Jim   Bad      Good     Good    Good

Main data segment is Quarter1 and Quarter2 Sales and Attendence (Atte). For the first record, sales rep John reporting to Joe had Good sales in Q1 and bad sales in Q2. His Q1 attentence was bad and is Q2 attendence was also bad.

If I were to do the following distinct query...

select distinct Q1Sales, Q2Sales, Q1Atte, Q2Atte from Employee

...it would return the following records:

Q1Sales  Q2Sales  Q1Atte  Q2AtteGood     Bad      Bad     BadBad      Good     Bad     BadGood     Good     Bad     GoodBad      Good     Good    Good

Now to my question about an Excel 2010 pivot table. I want to run a full extract of all the data in Employee (without distinct) and paste it into an Excel sheet. I then want to wrap it all in a pivot table. When fully collapsed, I want the pivot table to look like this:

Q1Sales  Q2Sales  Q1Atte  Q2AtteGood     Bad      Bad     BadBad      Good     Bad     BadGood     Good     Bad     GoodBad      Good     Good    Good

However, i want to be able to expand it two levels deep as shown here:

Q1Sales  Q2Sales  Q1Atte  Q2AtteGood     Bad      Bad     Bad     Sup     Joe        Name        John        MaryBad      Good     Bad     Bad    Sup    Sara        Name        Bob        Mary              Good     Good     Bad     Good    Sup    Joe        Name        EdBad      Good     Good    Good    Sup    Jim        Name        Sally

Does an Excel pivot table support this type of distinct querying? If I wasn't clear in my question, please let me know what additional information you need.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images