Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Age of Work Report

Discussion in 'Information Technology' started by MShreck, Oct 27, 2005.

Tags:
  1. MShreck

    MShreck
    Expand Collapse
    Guest

    I am trying to create an "Age of Work" report that compares the start date
    and the completion date of batches of work, then reports the # of batches
    completed in :

    0 - 5 days,
    6-10 days,
    11-15 days,
    16-20 days,
    21-30 days, and
    over 30 days.

    This report also needs to calculate what percentage of the total work was
    completed in the above timeframes.

    I have created the queries to select the count of records for the
    individual timeframes but I cannot find a way to pull the data for each
    timeframe within one query (calculating the count of records in each
    timeframe), and then calculating the percentages in an access report. Any
    help would be greatly appreciated
     
  2. Loading...


  3. OP
    David Lloyd

    David Lloyd
    Expand Collapse
    Guest

    The following two queries (the first feeds the second) allow you to count
    the totals for each group in one query. To get the total count for the
    percentage calculation, you could use a textbox to sum the various group
    counts, or you could use the DCount function.

    Query 1 (Named DateGrouping)

    SELECT TestDate.DateStart, TestDate.DateCompleted,
    DateDiff("d",[DateStart],[DateCompleted]) AS Days,
    IIf([Days]<=5,"0-5",IIf([Days]<=10,"6-10",IIf([Days]<=15,"11-15",IIf([Days]<=20,"16-20",IIf([Days]<=30,"21-30","Over
    30"))))) AS [Group],
    IIf([Days]<=5,1,IIf([Days]<=10,2,IIf([Days]<=15,3,IIf([Days]<=20,4,IIf([Days]<=30,5,6)))))
    AS SortOrder
    FROM TestDate;

    Query 2

    SELECT DateGrouping.Group, Count(*) AS [Count]
    FROM DateGrouping
    GROUP BY DateGrouping.Group, DateGrouping.SortOrder
    ORDER BY DateGrouping.SortOrder;


    --
    David Lloyd
    MCSD .NET
    http://LemingtonConsulting.com

    This response is supplied "as is" without any representations or warranties.


    "MShreck" <MShreck@discussions.microsoft.com> wrote in message
    news:79CFB66C-F865-4879-A1D4-A056B7590279@microsoft.com...
    I am trying to create an "Age of Work" report that compares the start date
    and the completion date of batches of work, then reports the # of batches
    completed in :

    0 - 5 days,
    6-10 days,
    11-15 days,
    16-20 days,
    21-30 days, and
    over 30 days.

    This report also needs to calculate what percentage of the total work was
    completed in the above timeframes.

    I have created the queries to select the count of records for the
    individual timeframes but I cannot find a way to pull the data for each
    timeframe within one query (calculating the count of records in each
    timeframe), and then calculating the percentages in an access report. Any
    help would be greatly appreciated
     
  4. OP
    MShreck

    MShreck
    Expand Collapse
    Guest

    Thank you very much!

    "David Lloyd" wrote:

    > The following two queries (the first feeds the second) allow you to count
    > the totals for each group in one query. To get the total count for the
    > percentage calculation, you could use a textbox to sum the various group
    > counts, or you could use the DCount function.
    >
    > Query 1 (Named DateGrouping)
    >
    > SELECT TestDate.DateStart, TestDate.DateCompleted,
    > DateDiff("d",[DateStart],[DateCompleted]) AS Days,
    > IIf([Days]<=5,"0-5",IIf([Days]<=10,"6-10",IIf([Days]<=15,"11-15",IIf([Days]<=20,"16-20",IIf([Days]<=30,"21-30","Over
    > 30"))))) AS [Group],
    > IIf([Days]<=5,1,IIf([Days]<=10,2,IIf([Days]<=15,3,IIf([Days]<=20,4,IIf([Days]<=30,5,6)))))
    > AS SortOrder
    > FROM TestDate;
    >
    > Query 2
    >
    > SELECT DateGrouping.Group, Count(*) AS [Count]
    > FROM DateGrouping
    > GROUP BY DateGrouping.Group, DateGrouping.SortOrder
    > ORDER BY DateGrouping.SortOrder;
    >
    >
    > --
    > David Lloyd
    > MCSD .NET
    > http://LemingtonConsulting.com
    >
    > This response is supplied "as is" without any representations or warranties.
    >
    >
    > "MShreck" <MShreck@discussions.microsoft.com> wrote in message
    > news:79CFB66C-F865-4879-A1D4-A056B7590279@microsoft.com...
    > I am trying to create an "Age of Work" report that compares the start date
    > and the completion date of batches of work, then reports the # of batches
    > completed in :
    >
    > 0 - 5 days,
    > 6-10 days,
    > 11-15 days,
    > 16-20 days,
    > 21-30 days, and
    > over 30 days.
    >
    > This report also needs to calculate what percentage of the total work was
    > completed in the above timeframes.
    >
    > I have created the queries to select the count of records for the
    > individual timeframes but I cannot find a way to pull the data for each
    > timeframe within one query (calculating the count of records in each
    > timeframe), and then calculating the percentages in an access report. Any
    > help would be greatly appreciated
    >
    >
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page