+ Reply to Thread
Results 1 to 9 of 9

How to chart multiple drug levels over period of time?

  1. #1
    Registered User
    Join Date
    12-23-2018
    Location
    London
    MS-Off Ver
    2011
    Posts
    4

    How to chart multiple drug levels over period of time?

    Dear Moderators,
    I will be so grateful for your help here..
    I have set of data for drug level that is measured over multiple points over period of 370 days for about 61 subjects;
    X axis: days on which the drug level measured, it is measured at variables points over 370 days
    Y axis: coded numbers represents patients

    What do I would like to do?
    I want to create multiple lines charts each line should represent drug levels measured over the specified period of time so if possible to have one chart with 61 line graphs




    Hope that make sense!

    worksheet is attached
    Attached Files Attached Files

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

    Re: How to chart multiple drug levels over period of time?

    I don't see an attempt to create the chart or any other indication of what you are having trouble with. I am not exactly sure what you want, but, to go for the easy first guess:
    1) Clear A1 (makes it easier for Excel to guess at what you want for X and Y value ranges in the chart.
    2) Select A1:MR62 and Insert -> Chart -> XY scatter
    3) Make sure Excel chooses the correct ranges for the data series (use "Switch row/column" and/or the Select Data dialog to fix, if Excel guesses wrong).
    4) Other formatting as desired.

    The resulting chart should have all of the data series in a single chart. There is a lot of data that will likely be bunched up on the chart, making it difficult to read. Is that what you want, or did you have something else in mind?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Valued Forum Contributor
    Join Date
    09-25-2015
    Location
    Nowy Tomysl, Poland
    MS-Off Ver
    2019, O365
    Posts
    398

    Re: How to chart multiple drug levels over period of time?

    According to me, placing such a large amount of data simultaneously on one graph will not give the correct image.
    Try organizing your data differently and inserting a pivot table with a filter.
    My proposal in the attachment.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-23-2018
    Location
    London
    MS-Off Ver
    2011
    Posts
    4

    Post Re: How to chart multiple drug levels over period of time?

    Hi Thanks.
    I think clearing A1 has helped, but as you said got a not very useful graph- as shown in the spreadsheet (see update attachments)
    I put an example of single graph which represents what I want, drug levels Y axis, time X axis but for one patient only, I want the final graph to include all of my samples, the 61 one patients, is it remotely possible?
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Hak101; 12-26-2018 at 09:38 PM.

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

    Re: How to chart multiple drug levels over period of time?

    It's not yet clear to me exactly what you want to do.

    In this latest file I:

    1) Entered "patient id" in cell A1 of sheet MPA T.
    2) Told Excel to make the table of data in MPA T a filtered list (https://www.wikihow.com/Use-AutoFilter-in-MS-Excel ).
    3) In the "patient id" dropdown of column A, I unchecked all and selected a random patient id. The filter hides every record except for the selected patient.
    4) Select the Graph tab to see the result on the chart. All of the data series except for the selected patient id are now hidden, and the chart only displays the data for the selected patient id.
    5) From here, I can go into the data table and select any given patient id to see that patient's chart.

    Is that what you are trying to do?

  6. #6
    Registered User
    Join Date
    12-23-2018
    Location
    London
    MS-Off Ver
    2011
    Posts
    4

    Re: How to chart multiple drug levels over period of time?

    Hi,
    This may get me closer to what I want, my ultimate goal to merge them all in one graph, so in the sample graph I sent there is graph for one patient and I would like to have all 61 graphs in one figure
    Are there any sheets attached with your latest reply? I can't see any!

    Thanks
    H

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

    Re: How to chart multiple drug levels over period of time?

    I did not attach anything to my previous post (#5), so there is not attachment to be found.

    It is still not clear to me exactly what you want. Reading between the lines, I see you kind of describing a "panel chart". Something like this? https://peltiertech.com/Excel/Charts...venScales.html
    Or maybe something like this example from Andy Pope (http://andypope.info/charts/miniplot_xy.htm ) where he shows multiple "mini" scatter charts on a single scatter chart (most of the work is building the matrix of data that the actual chart will use).

    Assuming I understand, the easiest (even if it is tedious) might be to build 61 separate charts. These examples should show that it is possible to put 61 charts onto a single chart, but there is a significant amount of effort transforming the raw data into something that will correctly display on a single chart, then some additional work to "fake" the individual axes and such.

  8. #8
    Registered User
    Join Date
    12-23-2018
    Location
    London
    MS-Off Ver
    2011
    Posts
    4

    Re: How to chart multiple drug levels over period of time?

    OK, I will give it another go & I will be so grateful for your help.
    I managed to produce the graph I want but by only removing the empty cells (which represents number of days of the course of one year) I did another graph for another subject (graph 2), the problem I am facing is that I can't put both in the same graph because samples were measured in different days for these two subjects.
    my question here, is there any way that I can combine graph 1 and graph 2 in one graph? how can I get around the problem that samples were measured at different days for subjects?
    see spread sheet, graph 1 and graph 2 (along with there data) try to put the two in one graphs & tell me how did it
    Attached Files Attached Files

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

    Re: How to chart multiple drug levels over period of time?

    Sorry for the late reply. I am not sure I understand your concern. I see no reason why you should not be able to create a graph that shows both data series.

    Are you certain that the problem is that Excel is preventing you from showing two data series on one chart? It appears to me that Excel should easily allow two or more series to chart on one chart while correctly plotting each series against the correct x axis value (day). The only thing that seems "off" to me is that your charts have the "hidden and empty cell" setting set to "gaps". This setting means that, when Excel encounters an empty cell in the data series, it does not connect those points with a line. Is that the real problem you are having?

    If that is the problem, the solution should be to select your chart and find the "hidden and empty cell" settings dialog and instruct Excel to "connect the points with a line". https://support.office.com/en-us/art...b-9ca49cb92274

    Does that help?

+ 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. Split period of time into regular intervals and show a chart
    By hanqie11 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-16-2017, 09:31 PM
  2. Gantt chart separated by multiple levels of categories
    By MikeFunktastic in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-27-2016, 02:23 PM
  3. [SOLVED] Simple Chart? Staffing Levels over period of time.
    By kspeese in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 08-06-2015, 08:23 PM
  4. [SOLVED] Function or macro to add a period between WBS levels
    By saltydog in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-16-2012, 01:41 PM
  5. [SOLVED] Complicated:Calculate time period based on no. of units sold + fluctuations within period
    By omaha.crab in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2012, 03:04 AM
  6. Dynamic chart for time period
    By errorfree in forum Excel General
    Replies: 4
    Last Post: 04-15-2010, 07:16 AM
  7. Replies: 1
    Last Post: 08-29-2006, 07:21 AM

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