What is the best way to create a SSRS 2005 Line Chart Report for a 12 month period?

I'm looking for advice on how to create a SQL Server 2005 query and line chart report for SSRS 2005.
I need to display the peak number of patients assigned to a medical practice each month for a 12 month period based on the end-user selecting a
single month and year.
I've previously created a report that displays all patients assigned to the practice for any single month but I’m looking for advice on how to
how to produce a resultset that shows the peak number of patients each month for a 12 month period. I thought about creating a query that returns the peak count for each month (based on my previously created report which displays all patients assigned to the
practice for any single month) and then use a UNION statement to join all 12 months but I'm sure that isn't the most efficient way to do this. The other challenge with this approach (twelve resultsets combined via a UNION) is that the end-user needs to be
able to select any month and year for the parameter and the report needs to display the 12 month period based on the month selected (the month selected would be the last month of the 12 month period).
For the report I’ve previously created that displays all patients assigned to the practice for any single month, the WHERE statement filters the
resultset on two fields:
Start Date - The date the patient was assigned to the practice. This field is never null or blank.
End Date - The date the patient left the practice. This field can be null or blank as active patients assigned to the practice do not have an End Date. When the patient
leaves the practice, the date the patient left is populated in this field.
Using these two fields I can return all patients assigned to the practice during Nov 2012 by looking for patients that meet the following criteria:
start date prior to 11/30/2012 (using the last day of the month selected ensures patients added mid-month would be included)
AND
end date is null or blank (indicates the patient is active) OR the end date is between 11/1/2012 -11/30/2012 (returns patients that leave during the month
selected)
Regarding the query I need to create for the report that displays the peak count each month for 12 months, I'm looking for advice on
how to count patients for each month the patient is assigned to the practice if the patient has been assigned for several months (which applies to most patients). Examples are:
John Doe has a start date of 6/01/2012 and an End Date of 10/07/2012
Sally Doe has a start date of 8/4/2012 and no End Date (the patient is still active)
Jimmy Doe has a  start of 7/3/2012 and an End Date of 9/2/2012
Given these examples how would I include John Doe in the peak monthly count each month for May - October, Sally Doe in the peak monthly count for
August - December and Jimmy Doe in the peak monthly count for July – Sept if the end-user running the report selected December 2012 as the parameter?
Given the example above and the fact I'm creating a line chart I think the best way to create this report would be a resultset that looks like
this:
Patient Name              
Months Assigned
John Doe
June 2012
John Doe                     
July012
John Doe                     
Aug 2012
John Doe                     
Sept 2012
John Doe
Oct 2012
Sally Doe                     
Aug 2012
Sally Doe                     
Sept 2012
Sally Doe
Oct 2012
Sally Doe                     
Nov 2012
Sally Doe
Dec 2012
Jimmy Doe                  
July 2012
Jimmy Doe
Aug 2012
Jimmy Doe
Sept 2012
From the resultset above I could create another resultset that would count\group on month and year to return the peak count for each month:
June 2012 - 1
July 2012 – 2
Aug 2012 - 3
Sept 2012 - 3
Oct 2012 - 2
Nov 2012 - 1
Dec 2012 - 1
The resultset that displays the peak count for each month would be used to create the line chart (month would be the X axis and the count would
be the y axis).
Does this sound like the best approach?
If so, any advice on how to create the resultset that lists each patient and each month they were assigned to the practice would be greatly appreciated.
I do not have permissions to create SPs or Functions within the database but I can create temp tables.
I know how to create the peak monthly count query (derived from the query that lists each patient and month assigned) as well as the line chart.
Any advice or help is greatly appreciated.

Thanks for the replies. I reviewed them shortly after they were submitted but I'm also working on other projects at the same time (hence the delayed reply).
Building a time table and doing a cross join to my original resultset gave me the desired resultset of the months assigned between dates. What I can't figure out now is how to filter months I don't want. 
Doing a cross  join between my original resultset that had two dates:
08/27/2010
10/24/2011
and a calendar table that has 24 rows (each month for a two year period)
my new resultset looks like this:
I need to filter the rows in yellow as the months assigned for stage 3 that started on 8/27/2010 should stop when the patient was assigned to stage 4 on 10/24/2011.
You'll notice that Jan - Sept 2011 isn't listed for Stage 4 assigned on 10/24/2011 as I included a filter in the WHERE clause that states
the Months Assigned value must be greater than or equal to the date assigned value.
Any advice would be appreciated.

Similar Messages

  • What is the best way to create a SSRS Report with Header Data and its associated child data

    So I have Member Information...Member ID...Member Addressing...etc.. I want to display this in the top part of the report like...
    Member Name:
    Member ID:
    Member Address Line 1:
    And then below I want to report on all the claims associated with a Member ID that is chosen by the Parameter. Obviously the Claim Data will be in Table format. Do I necessarily have to associate the Member Information with the Claim Information or simply
    use the same parameter? And what is the best Toolbox item to use to display the Member Information on top?
    Any help or guidance is greatly appreciated by this newbie.
    Thanks for your review and am hopeful for a reply.
    ITBobbyP

    Hi ITBobby,
    According to your description, you want to display all Claim Data for each Member. Right?
    In Reporting Services, we can use a table to display those Claim Data and make them group on Member ID. If you want to display the Member Information, we can put the data fields on parent group level. Then we can use create a parameter to filter the Member
    ID we need. We have tested this scenario in our local environment. Here are steps and screenshots for your reference:
    1. Create a DataSet(DataSet1) which contains the data fields of Member and Claim.
    2. Create a table and drag the Claim data into the table.
    3. In Row Group. Right click on Details and add a parent group.
    4. Select Member_ID in Group by.
    5. Right click on the textbox of Claim data. Select Insert Row->Outside of Group-Above. Drag the MemberName into the inserted row.
    6. In Report Data, right click on Parameter-> Add Parameter.
    7. Type Member_ID in Name and Prompt, select allow multiple values.
    8. In Available Values, select get data from a query. Choose DataSet1, select Member_ID in values and label. You can also set this in Default Values if you need.
    9. Save and preview.
    Reference:
    Understanding Groups (Report Builder and SSRS)
    Report Parameters (Report Builder and Report Designer)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • What is the best way to create business documents in CRM

    Hi All,
    What is the best way to create business documents like contract, sales order, debit memo etc in CRM ? Unlike R3 we can't use our good old BDC with recording. Moreover for most of them although there are Business Object but no BAPI to creation so what is the way ? I found in SDN there are two MAGIC Function module CRMXIF_ORDER_SAVE. Do I need to that alawys ?
    Is it nees to via IDoc and cannot be done just by calling from ABAP program ? The input parameter of the FM is a complex deep structure.
    Please help.

    Ashim,
    Try looking at the program:
    CRM_TEST_ORDER_MAINTAIN
    I think that should help you figure out the parameters.
    Good luck,
    Stephen

  • What is the best way to create a database schema from XML

    What is the best way to create a database schema from XML?
    i have  a complex XML file that I want to create a database from and consistently import new XML files of the same schema type. Currently I have started off by mapping the XSD into Excel and using Mysql for Excel to push into MySQL.
    There must be a more .net microsoft solution for this but I cannot locate the topic and tools by searching. What are the best tools and way to manage this?
    Taking my C# further

    Hi Saythj,
    When mentioning "a database schema from XML", do you mean the
    XML Schema Collections? If that is what you mean, when trying to import XML files of the same schema type, you may take the below approach.
    Create an XML Schema Collection basing on your complex XML, you can find
    many generating tools online to do that.
    Create a Table with the above created schema typed XML column as below.
    CREATE TABLE youTable( Col1 int, Col2 xml (yourXMLSchemaCollection))
    Load your XML files and try to insert the xml content into the table above from C# or some other approaches. The XMLs that can't pass the validation fail inserting into that table.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • What is the best way to create CRUD datagrids

    What is the best way to create CRUD datagrids that tell CF
    components to update sql tables. I find that I'm having to vreate
    all these columns with custom properites and its a bit of a chore:
    <mx:DataGridColumn id = "NatWest" dataField="NatWest"
    headerText="NatWest" editable="false"
    wordWrap="true"
    textAlign="right"
    headerStyleName="centered"
    labelFunction="price_labelFuncNatWest"
    sortCompareFunction="price_sortCompareFunc">
    I don't really want to use any wizards as I want control over
    my code.

    Hi Saythj,
    When mentioning "a database schema from XML", do you mean the
    XML Schema Collections? If that is what you mean, when trying to import XML files of the same schema type, you may take the below approach.
    Create an XML Schema Collection basing on your complex XML, you can find
    many generating tools online to do that.
    Create a Table with the above created schema typed XML column as below.
    CREATE TABLE youTable( Col1 int, Col2 xml (yourXMLSchemaCollection))
    Load your XML files and try to insert the xml content into the table above from C# or some other approaches. The XMLs that can't pass the validation fail inserting into that table.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • What is the best way to create a read more/collapse text box on the homepage of a site?

    What is the best way to create a read more/collapse text box on the homepage of a site?

    I figured this out by using a lightbox. I set the trigger at the top of the box, hid all initially and added a close button. In the box that would have linked to the first thumbnail for the lightbox, I added a text box that said "read more"

  • What is the best way to create shared variable for multiple PXI(Real-Time) to GUI PC?

    What is the best way to create shared variable for multiple Real time (PXI) to GUI PC? I have 16 Nos of PXI system in network and 1 nos of GUI PC. I want to send command to all the PXI system with using single variable from GUI PC(Like Start Data acquisition, Stop data Acquisition) and I also want data from each PXI system to GUI PC display purpose. Can anybody suggest me best performance system configuration. Where to create variable?(Host PC or at  individual PXI system).

    Dear Ravens,
    I want to control real-time application from host(Command from GUI PC to PXI).Host PC should have access to all 16 sets PXI's variable. During communication failure with PXI, Host will stop data display for particular station.
    Ravens Fan wrote:
    Either.  For the best performance, you need to determine what that means.  Is it more important for each PXI machine to have access to the shared variable, or for the host PC to have access to all 16 sets of variables?  If you have slowdown or issue with the network communication, what kinds of problems would it cause for each machine?
    You want to located the shared variable library on whatever machine is more critical.  That is probably each PXI machine, but only you know your application.
    Ravens Fan wrote:
    Either.  For the best performance, you need to determine what that means.  Is it more important for each PXI machine to have access to the shared variable, or for the host PC to have access to all 16 sets of variables?  If you have slowdown or issue with the network communication, what kinds of problems would it cause for each machine?
    You want to located the shared variable library on whatever machine is more critical.  That is probably each PXI machine, but only you know your application.

  • What is the best way to create E-Flyers and insert to Microsoft Outlook??

    What is the best way to create E-Flyers and insert to Microsoft Outlook??

    http://kb.mailchimp.com/article/how-to-code-html-emails
    Once created, the HTML document cab be placed in the Stationery folder.
    On a PC it's here.
    "C:\Program Files\Common Files\Microsoft Shared\Stationery"

  • What is the best way to create Aperture book from Pages '09 document?

    What is the best way to create Aperture book from Pages '09 document?

    There is no way to import pages documents to Aperture and convert them to an Aperture book. Aperture books can only be created by manually adding images and text to the pages of a book, and using the layout of the predefined templates.
    The best you could do, would be to print your pages document to pdf and import the resulting pdf file into Aperture as a new project. This will create one image for each page. Then select the page images all at once and  create a new book. Select a theme with fullsize page images, like "picture Book", and then add the images of the pages to the empty pages of the book.
    But probably would you get a much better quality and layout, when you recreate your pages document in Aperture, by starting with an empty book and copying and pasting the text from your Pages document. But don't paste the photos from the document - try to use the originals of those photos.

  • What is the best way to create space for a Yosemite download?

    What are the best ways to create space for the download of Yosemite.  I can't install it as I don't have enough space.

    Did you empty Trash?  Very important!
    How much space do you have available?  Click in the HDD icon on the desktop, COMMAND+I.
    Also try a Safe Boot:
    http://support.apple.com/kb/HT1564?viewlocale=en_US
    That will temporarily create some additional space.
    Ciao.

  • Dw, css, and a template, what is the best way to create a 20 page website with a different header in each page?

    dw, css, and a template, what is the best way to create a 20
    page website with different header content on each page? i am
    trying to insert a specific image and background color for each
    header on every page. what is the easiest or best way to do this?
    thanks, bryan

    "mediastream13" <[email protected]> wrote in
    message
    news:f47bes$9om$[email protected]..
    > ok, murray, here is the site.
    http://www.helphotline.org
    > in I.E. 6 i can't see the background color behind the
    header images,
    I'm seeing a hot pink background (which is my browser default
    - so that I do
    remember to declare a background color). You need to add:
    body { background-color: white;} to your stylesheet, or into
    the imbedded
    styles on your page.
    In Firefox, the very top black section, #headertop is hidden
    behind the
    header image.
    > background of the date/time isn't stretching the full
    length of the
    > screen, and
    > the margins aren't working in the main content area. how
    can i put a
    > background
    > color behind the header images?
    I can see the header image stretching right across the page..
    so not sure
    what color is missing there.
    > is there anyway to download i.e. six on my computer if i
    already have
    > i.e.7? i
    > just want to be able to preview the site before i upload
    the changes. it
    > seems
    > everything works in i.e. 7.
    Yes, I used this and it works really well.
    http://tredosoft.com/Multiple_IE
    Nadia
    Adobe® Community Expert : Dreamweaver
    CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    ~ Customisation Service Available ~
    http://www.csstemplates.com.au

  • What is the best way to create a Flash site

    Hello Everyone,
    I am realtively new to flash. I created the splash page of
    our site in flash but 1st off it takes to long to load as it is.
    But I would like to create the entire site in Flash. What is the
    best way to create a Flash site, and are there tutorials out there
    or any really good books, resources, or online classes to learn
    Flash well. I understand the basic of flash and have created
    banners, and other flash materials.
    Can anyone help?

    For me, as a noob, It's all about creative problem solving.
    For lots of stuff, there's no right or wrong solution, but you have
    to figure things out on your own. I, too, have built sites from the
    ground up, and then rebuilt them even better. It's the only way to
    really learn it well. Books, online forums, help docs all sort of
    help, but it all comes down to how innovative you can be with
    integrating them all into a site that is completely yours.
    This might save you loads of headaches: avoid using scenes,
    unless you are doing only animation. Keep each of your 'pages' on
    their own keyframe, and use 'gotoAndStop' to navigate through them.
    This is perhaps the easiest way to create a website quickly.
    P

  • Hi all! What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    Buying more hard drive space is a very valid option, here.  Editing takes up lots of room, you should never discount the idea of adding more when you need it.
    Another possibility is exporting to MXF OP1a using the AVC-I codec.  It's not lossless, but it is Master quality.  Plus the file size is a LOT smaller, so it may suit your needs.

  • What is the best way to create 10000 users in ECC system

    Dear all,
    what is the best way to create 10,000 users in ECC 6 system.
    As of my knowledge we can create with SECATT, but I don't know the procedure to use this.
    please guide me...
    Regards,
    Raaja

    Hi Raaja,
    If you search in SDN or on google for eCATT tutorial, you will get all the info you need to learn to create them.
    For 10000 users I would suggest the following
    1. eCATT to create user ID's (include all the info like passwords, user groups in here).
    2. eCATT to make the role assignment.  Use SU10 to record the assignment to the users you created with the first script as it gives you more flexibility
    If you have the data you need then you should be able to run both steps in 1 work day (dependent on system performance).
    Edited by: Alex Ayers on Jan 25, 2009 11:16 AM

  • What's the best way to create a login page in muse?

    Hi.
    Busy exploring muse I came across another problem:
    What’s the best way to create a login page in muse?
    I want to create 1 page on a site with access for people with login details only.
    Sorry for beeing a newbie
    Dutch greets
    Toin Corten

    Hi Toin,
    Never need to apologize for being a newbie...we all were at one point or another. 
    I am going to move this question to the main Muse forum where you'll have a much better chance of getting a response.  This particular forum is for questions around our Muse getting started project.
    You may also want to check this thread out: http://forums.adobe.com/thread/1004543.
    Thank you,
    Ed Sullivan

Maybe you are looking for

  • Bluetooth A2DP and Speakable Items

    I would like to get a bluetooth headset for my phone, but it would be nice if I could use it for speakable items as well. In Tiger, I remember that headsets were not supported by speakable items due to their low sound quality. Since Leopard now suppo

  • Billing Block 06 not getting applied

    Hi Friends, When i am creating a sales order, even though the net value is 0 the system is not applying the Price incomplete Billing block. The 06 block is defined in OVV3 and has been assigned  to the Billing document type F2. Is there any other set

  • Link between MIC and classification system

    Hi All, Any body please suggest the table where is the link between MIC and class characteristic. Regards, Rogério Reis

  • Cannot setup 2050a printer to mac OS 10.6

    Hiya, hope someone will be able to help me out, i've been pulling my hair out all day! i can't for the life of me setup my printer. installation is fine... until it gets to the setup. doesnt work, cos my printer device cant be found. i think its beca

  • Help needed - want to skip to the menu screen, using any button!

    hey there - i'm creating a DVD in DVD Studio Pro 4 - when the DVD is inserted, the viewer is treated to a bunch of trailers and previews - it's set up with the "First Play" option. i have to do it this way, for the client. obviously, i'd like the vie