+ Reply to Thread
Results 1 to 5 of 5

How to structure my table for both stacked area chart and pivot table?

  1. #1
    Registered User
    Join Date
    12-02-2018
    Location
    Ohio, USA
    MS-Off Ver
    Office 2016
    Posts
    15

    How to structure my table for both stacked area chart and pivot table?

    I understand that you should structure your table so that all values of the same type should be in one column. But I still want to create a stacked-area chart with the columns as my series.

    For example, see the following two tables:

    Table1:

    Year Bears Dolphins Whales
    2017 8 150 80
    2018 54 77 54
    2019 93 32 100
    2020 116 11 76
    2021 137 6 93
    2022 184 1 72

    Table2:

    Year Animal Amount
    2017 Bears 8
    2017 Dolphins 150
    2017 Whales 80
    2018 Bears 54
    2018 Dolphins 77
    2018 Whales 54
    2019 Bears 93
    2019 Dolphins 32
    2019 Whales 100
    2020 Bears 116
    2020 Dolphins 11
    2020 Whales 76
    2021 Bears 137
    2021 Dolphins 6
    2021 Whales 93
    2022 Bears 184
    2022 Dolphins 1
    2022 Whales 72

    Which is correct? If Table1, how do I create a PivotTable with the data? If Table2, how do I make a stacked area chart?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: How to structure my table for both stacked area chart and pivot table?

    Use Table 2. Insert a Pivot Table with Years as Rows and Animals as Columns, Sum of Amount as Values. Then Insert a Chart ... pick Recommended, then Area, then Stacked
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: How to structure my table for both stacked area chart and pivot table?

    See the attached example
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-02-2018
    Location
    Ohio, USA
    MS-Off Ver
    Office 2016
    Posts
    15

    Re: How to structure my table for both stacked area chart and pivot table?

    That’s amazing. You’re a genius. Thank you so much!

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: How to structure my table for both stacked area chart and pivot table?

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. Navigate Pivot Table Row Structure
    By abbeywigan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-16-2017, 04:23 AM
  2. How to create stacked chart from a pivot table.
    By stephme55 in forum Excel General
    Replies: 3
    Last Post: 06-30-2016, 02:59 PM
  3. Replies: 5
    Last Post: 12-09-2015, 12:41 PM
  4. Help! Pivot table changes background on re-structure
    By aronax in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 08-05-2015, 04:44 AM
  5. Replies: 1
    Last Post: 07-22-2015, 07:16 AM
  6. Replies: 2
    Last Post: 12-16-2014, 12:47 PM
  7. pivot table output structure
    By koochandkai in forum Excel General
    Replies: 1
    Last Post: 08-20-2012, 02:37 PM

Tags for this Thread

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