script to create records to fill in gaps in history table
I am working on building reports for a issue management ticketing system. The ticketing system database does not keep a transactional history of the ticket status, which is making it hard to answer questions in Qlik Sense like : How many tickets were open in Jan-2015, Feb-15? How many tickets were resolved in Mar-2015? etc.
The database does have the necessary data in order to create the necessary data through calculations.
Source Data Table:
Ticket_ID
Open_Date
Resolve_Date
Close_Date
1
1/1/15
3/1/15
3/10/15
2
1/1/15
4/10/15
3
2/10/15
Event Table:
Ticket_ID
Event
Event_Date
1
Opened
1/1/15
1
Resolved
3/1/15
1
Closed
3/10/15
2
Opened
1/1/15
2
Resolved
4/10/15
3
Opened
2/10/15
Does anyone have any advice on how I should best "fill in the gaps" - my idea for the data structure is below (the granularity in reporting does not need to go below month-year), but am open to better ideas.