+ Reply to Thread
Results 1 to 2 of 2

Compare this year vs. previous year data in one graph (date vs. quantity)

  1. Compare this year vs. previous year data in one graph (date vs. quantity)

    I want to create a graph (automatically in a report) which compares
    the current year's values to the previous years by plotting two lines
    on one chart.

    I have one table which has the fields: Date and DeckDefects (which
    is a number)

    I would like the X axis to show months and the Y axis to show # of
    DeckDefects


    This should be real easy, but I can't find anything about it.

    Thanks


  2. Re: Compare this year vs. previous year data in one graph (date vs. quantity)

    Craig, I assume that this year's values and last year's values are all in
    the one table (which is the right design.) Since you want 2 different
    results for two different periods from the same table, use a subquery to get
    last year's results and match them to this one.

    If subqueries are new, see:
    Subquery basics: Year to date
    at:
    http://allenbrowne.com/subquery-01.html#YTD
    The article discusses what subqueries are, and demonstrates how to make a
    year-to-date query. You can do a period-compared-to-last-year in the same
    way.

    Once you have the query, you can use it as the source for one of the chart
    types that handles multiple domains.

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    wrote in message
    news:1190742275.500957.259140@r29g2000hsg.googlegroups.com...
    >I want to create a graph (automatically in a report) which compares
    > the current year's values to the previous years by plotting two lines
    > on one chart.
    >
    > I have one table which has the fields: Date and DeckDefects (which
    > is a number)
    >
    > I would like the X axis to show months and the Y axis to show # of
    > DeckDefects
    >
    > This should be real easy, but I can't find anything about it.
    >
    > Thanks



+ Reply to Thread