+ Reply to Thread
Results 1 to 18 of 18

How to chart year-year comparison when data is in different worksheets

  1. #1
    Registered User
    Join Date
    02-15-2018
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    13

    How to chart year-year comparison when data is in different worksheets

    I have a workbook with two worksheets, each for the separate years 2017 and 2018, each containing columns with a date and a rate. I can easily create a chart for one year showing how the rate changes over the year. I want to create a chart which shows both years by comparison, the current year 2018 being in progress and incomplete.

    If I try to put both years’ data on the same worksheet it fouls up the dates. I can’t find a way of having the x-axis (date) treat the date as MM-DD, ignoring the year, so that both line charts can show across the same x-axis to enable the comparison.

    Thanks for any advice!

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: How to chart year-year comparison when data is in different worksheets

    Can you post a sample of how the dates get 'fouled up' when you append the data?

  3. #3
    Registered User
    Join Date
    02-15-2018
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    13

    Re: How to chart year-year comparison when data is in different worksheets

    Sorry what I should have said was that the dates for the two series of rates are different and so when I tried putting the tables for each of the two years side by side on a single worksheet they didn't correlate eg on a particular row the date for the first year might have been 9-1-17 and for the second year 10-1-17 (if that makes sense).
    Last edited by Bloodrule; 02-15-2018 at 01:10 AM.

  4. #4
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: How to chart year-year comparison when data is in different worksheets

    I think you need to add an attachment with date samples from both sheets.

    EDIT - removed query.
    Last edited by kersplash; 02-15-2018 at 01:17 AM. Reason: removed query as OP had edited their post

  5. #5
    Registered User
    Join Date
    02-15-2018
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    13

    Re: How to chart year-year comparison when data is in different worksheets

    Sorry about the typo

    First sheet '2018'
    Date Rate
    09-Jan-18 45
    09-Jan-18 90
    09-Jan-18 135

    Second sheet '2017'
    Date Rate
    11-Jan-17 36
    11-Jan-17 72
    11-Jan-17 108

  6. #6
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: How to chart year-year comparison when data is in different worksheets

    I don't see any difference between the dates.

  7. #7
    Registered User
    Join Date
    02-15-2018
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    13

    Re: How to chart year-year comparison when data is in different worksheets

    I've attached the full data which better shows how the dates, though formatted the same, fall on different days.
    Attached Files Attached Files

  8. #8
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: How to chart year-year comparison when data is in different worksheets

    i think I get what you mean now, you want both series of dates plotted on the same chart as 2 different lines as a comparison ignoring the year?

  9. #9
    Registered User
    Join Date
    02-15-2018
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    13
    Quote Originally Posted by kersplash View Post
    i think I get what you mean now, you want both series of dates plotted on the same chart as 2 different lines as a comparison ignoring the year?
    Exactly! 🙂

  10. #10
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: How to chart year-year comparison when data is in different worksheets

    Please check out the attached.

    Formatted the dates and added them as separate series in the chart.
    Attached Files Attached Files

  11. #11
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: How to chart year-year comparison when data is in different worksheets

    On second thoughts this might be wrong.

  12. #12
    Registered User
    Join Date
    02-15-2018
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    13

    Re: How to chart year-year comparison when data is in different worksheets

    That's precisely what I was unable to produce. I see you simply reformatted the dates to get rid of the year, right? I'd assumed that irrespective of formatting Excel would 'know' what the real dates were and that it wouldn't work that way. Nice solution! Why did you think it might be wrong?

  13. #13
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: How to chart year-year comparison when data is in different worksheets

    As the series for the dates is based off 2017 only which means that unless the measurements are taken at exactly the same point in time during the year, the rate for 2018 may end up in the wrong position.

  14. #14
    Registered User
    Join Date
    02-15-2018
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    13
    Quote Originally Posted by kersplash View Post
    As the series for the dates is based off 2017 only which means that unless the measurements are taken at exactly the same point in time during the year, the rate for 2018 may end up in the wrong position.
    You've put me on the right track. I can tweak it from here. Thanks!!

  15. #15
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: How to chart year-year comparison when data is in different worksheets

    I've actually come up with a nicer idea. Look at the attached.

    2 charts overlaying each other, one transparent.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    02-15-2018
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    13

    Re: How to chart year-year comparison when data is in different worksheets

    Nice solution - didn't realise you could overlay the charts like that - but I like your first solution's elegance, even if the date matching isn't perfect.
    Last edited by Bloodrule; 02-15-2018 at 02:23 AM.

  17. #17
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: How to chart year-year comparison when data is in different worksheets

    The blue series is 2017, so full year.
    The orange series is 2018, so part year.
    2 separate charts....overlapped to make them look like they are one chart.

    Add data to the bottom of the 2018 table and it will update on the chart.
    You may have to play with the vertical axes on both charts if the values go beyond the 2017 data.
    Last edited by kersplash; 02-15-2018 at 02:25 AM.

  18. #18
    Registered User
    Join Date
    02-15-2018
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    13
    Quote Originally Posted by kersplash View Post
    The blue series is 2017, so full year.
    The orange series is 2018, so part year.
    2 separate charts....overlapped to make them look like they are one chart.

    Add data to the bottom of the 2018 table and it will update on the chart.
    You may have to play with the vertical axes on both charts if the values go beyond the 2017 data.
    Good one! 🙂 Thanks again.

+ 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. Excel 2007 - Comparison of monthly sales year on year
    By djr1970 in forum Excel General
    Replies: 7
    Last Post: 08-12-2014, 01:56 PM
  2. year to year comparison, reflecting a larger pie
    By ktalamantez in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-19-2014, 02:09 AM
  3. Year to Year Monthly comparison
    By OTownPrinter in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-11-2013, 11:39 AM
  4. Replies: 0
    Last Post: 11-23-2012, 01:27 AM
  5. Creative Ways for a year-to-year comparison???
    By ridonkulous5 in forum Excel General
    Replies: 1
    Last Post: 03-23-2011, 01:27 AM
  6. Year on Year Comparison Chart
    By aroma658 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-23-2009, 06:39 AM
  7. Replies: 1
    Last Post: 01-30-2009, 09:02 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