Results 1 to 2 of 2
  1. #1
    baronqueefington is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Dec 2014
    Posts
    32

    Help with data analysis options Dcount - Crosstab query (newbie)

    Good evening,

    I have a table [Control Table] with the fields [Date signed] and [outcome] date signed is formatted as dd/mm/yyyy and the outcome field is a drop down with the options granted, not granted ect

    I am looking for a way to present the data using specific date ranges.

    I have found 2 possible avenues;

    Dcount in a select query:

    w/c 01/04/2014 GRANTED: DCount("[Date signed]","[control table]","[Date signed]>=#04/01/2014# And [Date signed] <=#04/06/2014# And [Outcome]='Granted'")

    w/c 01/04/2014 Not GRANTED: DCount("[Date signed]","[control table]","[Date signed]>=#04/01/2014# And [Date signed] <=#04/06/2014# And [Outcome]='Not Granted' And [Reason not granted]='Assessed'")

    w/c 01/04/2014 Discharged: DCount("[Date signed]","[control table]","[Date signed]>=#04/01/2014# And [Date signed] <=#04/06/2014# And [Reason not granted]='Discharged'")

    ECT

    But I would need to create the multiple queries 52 times each for the different count value per week




    my 2nd option

    I have looked at crosstab query, but I cant find a way for it to list the specific dates I need it to query e.g from

    01/04/2014 - 06/04/2014
    07/04/2014 - 13/04/2014
    14/04/2014 - 20/04/2014

    ECT

    Does anyone have any tips on Data analysis? I have been able to perform the task previously in excel using If statements but we are now moving to access and I somewhat stumped.

    Thanks.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Your date range is weekly? You can create a field in query that calculates the Year and Week Number and use that field in a grouping query/report or CROSSTAB.

    YrWk: Year([datefield] & Format(DatePart("ww",[datefield]), "00")

    Can be a complication where the week crosses other periods - monthly, yearly. Do you want December 28 and January 1 data to roll into same week?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 05-21-2014, 12:38 AM
  2. Add/append data to crosstab query
    By DatabaseIntern in forum Queries
    Replies: 4
    Last Post: 08-02-2012, 10:15 AM
  3. Data Analysis Direction
    By canyon289 in forum Access
    Replies: 6
    Last Post: 03-05-2012, 11:51 PM
  4. Table Data Analysis
    By bdf48 in forum Programming
    Replies: 1
    Last Post: 12-01-2011, 02:21 PM
  5. Crosstab Query Prompting twice for data?
    By AccessFreak in forum Queries
    Replies: 5
    Last Post: 01-07-2011, 10:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums