+ Reply to Thread
Results 1 to 4 of 4

Single instance of column item in Pivot table

  1. #1
    Registered User
    Join Date
    07-05-2016
    Location
    Montreal
    MS-Off Ver
    2016
    Posts
    2

    Single instance of column item in Pivot table

    OK so I have this planification sheet on classes and I need to figure out how busy the teachers will be. Here's the data I have (see attached sheet for correct formatting!)

    nb credits class will be given on class will be given again on class will be given again on
    class1 teacherA 2 1st trimester 2017 1st trimester 2018 1st trimester 2019
    class2 teacherB 3 2nd trimester 2017 1st trimester 2018 2nd trimester 2019
    class3 teacherA 1 1st trimester 2018 2nd trimester 2018 3rd trimester 2019


    And the data I'd like to get: (the numbers in the cells are the total of credits in this trimester)
    1st trimester 2017 2nd trimester 2017 3rd trimester 2017 1st trimester 2018 etc
    teacherA 2 0 0 3
    teacherB 0 3 0 3

    I'm currently using a Pivot Table, but the columns are listed twice (I have put the 'class will be given on', 'class will be given again on', etc. as columns).

    I can't seem to regroup them correctly, using the Grouping option. Any hints on how I could achieve this?

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Single instance of column item in Pivot table

    Hi,

    Unfortunately that is not a good data layout for a pivot table. Your data needs to be put into a normalised structure like this:

    Column1 Teacher
    nb credits
    class will be given on
    class1
    teacherA
    2
    1st trimester 2017
    class1
    teacherA
    2
    1st trimester 2018
    class1
    teacherA
    2
    1st trimester 2019
    class2
    teacherB
    3
    2nd trimester 2017
    class2
    teacherB
    3
    1st trimester 2018
    class2
    teacherB
    3
    2nd trimester 2019
    class3
    teacherA
    1
    1st trimester 2018
    class3
    teacherA
    1
    2nd trimester 2018
    class3
    teacherA
    1
    3rd trimester 2019


    The pivot table will then simply require the class trimester to be a column field, teacher a row field and any field as the data counter.

    Sum of nb credits Column Labels
    Row Labels 1st trimester 2017 2nd trimester 2017 1st trimester 2018 2nd trimester 2018 1st trimester 2019 2nd trimester 2019 3rd trimester 2019 Grand Total
    teacherA
    2
    3
    1
    2
    1
    9
    teacherB
    3
    3
    3
    9
    Grand Total
    2
    3
    6
    1
    2
    3
    1
    18

  3. #3
    Valued Forum Contributor
    Join Date
    05-11-2013
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    586

    Re: Single instance of column item in Pivot table

    Hi,

    Welcome to the Forum.

    Had a quick look at your file and would comment as follows:-
    You have asked for the following:-
    1st trimester 2017 2nd trimester 2017 3rd trimester 2017 1st trimester 2018, but "3rd trimester 2017" isn't in the original Data.
    Also, under Pivot Table > Design > Subtotals, have you selected "Do Not Show Subtotals" ?

    Regards

    peterrc

  4. #4
    Registered User
    Join Date
    07-05-2016
    Location
    Montreal
    MS-Off Ver
    2016
    Posts
    2

    Re: Single instance of column item in Pivot table

    Quote Originally Posted by peterrc View Post
    Also, under Pivot Table > Design > Subtotals, have you selected "Do Not Show Subtotals" ?
    Great, I didn't have a look at these options. Which made me realize there was also a Timeline available, which looks like what I'm trying to use. I could reformat "1st trimester 2018" as a date format like "Jan 1, 2018" and use it in the timeline. But I only seem to be able to use the timeline as a filter though, not as an embedded column (Ideally, I would get a column per trimester... even though I don't have any data). So maybe using a PivotTable is not the proper way to do it, I'm not sure. How could I get a kind of 'easy gantt chart' that shows a timeline with the credits being given per teacher under? (Edit: just to be clear, I don't want a Gantt chart per say, I'm just interested in the top timeline you have in a Gantt chart... In my case, I'd use trimesters as columns of a timeline.)

    Thanks again!
    Last edited by Audrey1; 07-05-2016 at 09:51 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA code to create pivot for single pivot item, if required item is not available cre
    By Ishwarind in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-04-2016, 11:06 AM
  2. Calculated Field / Column / Item in Pivot Table
    By rashid.mehmood in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 10-23-2015, 01:58 PM
  3. Macro for selecting a single item while filtering the data in Pivot Table
    By Syed964 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-13-2013, 01:28 PM
  4. Pivot Table Will Not Filter A Single Character Item
    By SndGenRX7 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2012, 09:05 AM
  5. [SOLVED] Return Single Instance of Numeric Values from a Column
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 AM
  6. [SOLVED] Return Single Instance of Numeric Values from a Column
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  7. [SOLVED] Return Single Instance of Numeric Values from a Column
    By Sam via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-25-2005, 11:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1