Results 1 to 4 of 4

Analyze subset of data in table

Threaded View

  1. #1
    Registered User
    Join Date
    12-02-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    32

    Analyze subset of data in table

    I have data as below. Patients can have several visits of various types. Some visit types may repeat (Initial Visit is the exception).

    ID	Visit	        VisitDate       Other Variables (not shown)
    ------------------------------------------------------------
    1	Initial Visit	1/1/2005
    1	Check-Up	2/2/2005
    1	Well-Being	3/10/2005
    1	Well-Being	7/7/2005
    1	Surgery	        9/1/2008
    ------------------------------------------------------------
    2	Initial Visit	2/3/2000
    2	Check-Up	5/1/2000
    2	Well-Being	3/1/2001
    ------------------------------------------------------------
    3	Initial Visit	7/1/2009
    3	Surgery 	4/1/2010
    I'm using Pivot Tables to analyze these data. How can I answer questions like:

    1. Among patients who had Well-Being visits, how many had a Surgery visit? [The answer is 2 patients had Well-Being visits, 1 of whom has had a Surgery visit.]

    2. What is the average number of days that passed between the Initial Visit and the Surgery Visit?

    To answer questions like these via the pivot, I suspect I need to restructure the data somehow, but I'm not entirely sure of the best way of even if that's necessary.

    Thank you for any suggestions.
    Attached Files Attached Files

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