Surjeet729
New member
- Local time
- Today, 10:37
- Joined
- Sep 8, 2022
- Messages
- 6
I need help with an Access query.
The request is for a rolling average in days that a ticket is in a given status.
IDs are set to auto-increment, so the same ticket will have multiple IDs for different months. I've been working with Ticket_Name for this reason.
The set-up is below:
Date | Ticket_Name | Status | Prior Status | Creation_Date | Last_Modified_Date | Status Length in Days
8/21 AB Open Open 6/21 7/21 (missing, need)
8/21 BC Open Pending Date_Field Date_Field
8/21 CD Pending *Blank*
9/21 AB In Review Open
9/21 BC Closed Open
9/21 CD Open Pending
10/21 AB Closed In Review
10/21 BC Closed Closed
10/21 CD Open Open
For reporting purposes the ultimate goal is:
Status | Average time spent in status in days
Pending 7
Open 45
In Review 10
Closed ---
I've made some progress subtracting the ticket date from current date to create a "count of days" column and grouping the tickets by which ones equal each other. I have yet to successfully integrate any grouping of statuses into this query.
I think a partition by or subquery is required. A more efficient processing option if possible is preferred, as some options I've tried make Access stall out.
Any help is greatly appreciated! Thank you.
The request is for a rolling average in days that a ticket is in a given status.
IDs are set to auto-increment, so the same ticket will have multiple IDs for different months. I've been working with Ticket_Name for this reason.
The set-up is below:
Date | Ticket_Name | Status | Prior Status | Creation_Date | Last_Modified_Date | Status Length in Days
8/21 AB Open Open 6/21 7/21 (missing, need)
8/21 BC Open Pending Date_Field Date_Field
8/21 CD Pending *Blank*
9/21 AB In Review Open
9/21 BC Closed Open
9/21 CD Open Pending
10/21 AB Closed In Review
10/21 BC Closed Closed
10/21 CD Open Open
For reporting purposes the ultimate goal is:
Status | Average time spent in status in days
Pending 7
Open 45
In Review 10
Closed ---
I've made some progress subtracting the ticket date from current date to create a "count of days" column and grouping the tickets by which ones equal each other. I have yet to successfully integrate any grouping of statuses into this query.
I think a partition by or subquery is required. A more efficient processing option if possible is preferred, as some options I've tried make Access stall out.
Any help is greatly appreciated! Thank you.
Last edited: