+ Reply to Thread
Results 1 to 13 of 13

Line chart with three different types of data!?!

  1. #1
    Registered User
    Join Date
    07-31-2012
    Location
    Somewhere, Indiana
    MS-Off Ver
    Excel 2010
    Posts
    19

    Line chart with three different types of data!?!

    Hey everyone,

    I'm trying to make an 2d line chart on excel 2010. I have three columns worth of data. One column has a date (mm/dd/yyyy). The second column is time (hh:mm:ss) and the third column has a reason code (text). So I want to make a line chart that tracks the "time" over the "dates". So the dates would be the x axis and the time the y axis. The trick come in with the reason code, the reason it's a line chart is I want different line for different "reason codes". I thought this would be simple, but I can't figure out the way excel has you chose your data source. If i highlight all three columns it gives me either a line chart of time vs date or reason code vs date or gives me an error of "Some chart types cannot be combined with other chart types. Please select a different chart type.

    Any help is appreciated, thanks!!!

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Line chart with three different types of data!?!

    a sample workbook would assist us I reckon. can't really picture what you are trying to show.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    07-31-2012
    Location
    Somewhere, Indiana
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Line chart with three different types of data!?!

    Excel.xlsx

    The columns I'm talkin about are U( date) AE( Time) and AF(Reason code). The x axis should be the date, they y axis time and the legend reason codes.

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Line chart with three different types of data!?!

    that's not really helpful as there's no data or indication of what the chart should look like. are you trying to aggregate the total time per day for each reason? if so, a pivot chart should work but you'll need to fill in the blank header cell for the reason code column.

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Line chart with three different types of data!?!

    There isn't enough information in the spreadsheet to put together a complete answer (or maybe it's because I'm using google docs to view it).

    In any case, the easiest approach to graphing multiple series like that is to create a table that would look something like this (comma delimits cells):
    Please Login or Register  to view this content.
    I'm not sure what the best way is to extract a table like that from a single column like you have. A table like this will make creating the chart easy.

  6. #6
    Registered User
    Join Date
    07-31-2012
    Location
    Somewhere, Indiana
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Line chart with three different types of data!?!

    I wanted a line chart, that would indeed indicate the total time per day of each reason code. However, if that can't work, whatever chart can show that is fine. Any idea how i could achieve the line chart?

    ---------- Post added at 08:57 AM ---------- Previous post was at 08:55 AM ----------

    Mr. Shorty, because of the large number of possible reason codes (19) formatting my excel sheet like that would be ...undesirable.

    ---------- Post added at 08:59 AM ---------- Previous post was at 08:57 AM ----------

    I don't know if this helps but I have the totals for each reason code in BM

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Line chart with three different types of data!?!

    a pivot chart like this?
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    07-31-2012
    Location
    Somewhere, Indiana
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Line chart with three different types of data!?!

    That would be great! However, did you make it using the format i had? It looks like you used the format MrShorty was recommending.

  9. #9
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Line chart with three different types of data!?!

    it's built directly off the first sheet-the pivot table does the work for you and the chart then runs from the pivot table.

  10. #10
    Registered User
    Join Date
    07-31-2012
    Location
    Somewhere, Indiana
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Line chart with three different types of data!?!

    Great! haha ummI'm having trouble finding pivot chart option now though. Can you walk me through it? I highlight the three columns(does order matter?) then what?

  11. #11
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Line chart with three different types of data!?!

    Insert tab then click arrow beneath the Pivot Table option and choose pivot chart, select the data as all columns from the day column to the reason code column. then you want the reason codes as legend entries, day as axis field and time as value field.

  12. #12
    Registered User
    Join Date
    07-31-2012
    Location
    Somewhere, Indiana
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Line chart with three different types of data!?!

    Oh man, you guys are awesome! I'm mark the thread as solved. Quick question though, does the pivot chart update itself when new data is added in? or is there a way like the other graphs and charts on the worksheet i showed you where it stays blank until needed?

  13. #13
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Line chart with three different types of data!?!

    you can create a dynamic named range for the source of the pivot table: http://www.contextures.com/xlPivot01.html
    then all you need to do is refresh the pivot.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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