Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2003
    Posts
    9

    Red face Unanswered: Run Quarterly report based on Month

    Hi,
    I'm using access 2000 and I have a table that is as follows
    Month Dept Cost
    ------ ----- -----
    1 A 1200
    2 A 1500
    1 B 2000
    3 A 4300
    2 B 1000
    3 B 2000

    I need to run a query that would give me a result based on quarter, using month value
    The output will look like
    Dept Quarter 1 Quarter 2
    A 7000
    B 5000 ...

    I would appreciate if some of the folks here can help me with this.
    Thanks

  2. #2
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    sushri

    With the query wizard do and cross reference query.
    Saludos
    Norberto

  3. #3
    Join Date
    Aug 2003
    Posts
    9
    I know there is "q" that will provide information by quarter, but I'm not sure of the format of using this based on month, as I don't have a year or a date format. It is just the month number I have as 1,2,3...12

    Norberto, I tried using the wizard, but it doesn't provide me the option of consolidating the data quarterly.

  4. #4
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    sushri
    The quarter "q" donīt work if the field is not a date.
    Then...is not easy but you canīt do it, use the IIf sentence something
    like this the query disign
    = IIf(monthfield = 1 or monthfield <= 4;1;IIf(monthfield = 5 or monthfield <= 8;2;3))
    Saludos
    Norberto

  5. #5
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    sushri
    The quarter "q" donīt work if the field is not a date.
    Then...is not easy but you canīt do it, use the IIf sentence something
    like this the query disign
    YourQuarter: IIf(monthfield = 1 or monthfield <= 4;1;IIf(monthfield = 5 or monthfield <= 8;2;3))
    Saludos
    Norberto

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •