Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Qlik sense desktop
I want to create a line chart that shows how many my tickets where open at the end of each month.
For x dimension i wanted to be time. At the moment I have a master calendar with the field month and year that i´m using on other graphs.
The data that I have is something like this:
id | ticket_state_id | create_time | change_time |
12941 | 2 | 02/01/2014 | 02/01/2014 |
12942 | 2 | 02/01/2014 | 02/02/2014 |
12943 | 2 | 02/01/2014 | 03/06/2014 |
12944 | 2 | 02/01/2014 | 12/09/2014 |
that goes from Jan_2014 to Dez_2016, but it to continue. Change_time is when the ticket was closed.
Also through id i want to connect to other tables where i have information on who is the client and so on.
So is there any need to rearange the data? How to i make the graph?
May be look into IntervalMatch to connect your table to a master calendar. Once you have this setup, you can easily use Month from your master calendar as your dimension.
Assuming that you have all the dates from minimim of create date to maximum of change date in field DateNum.
Use below code.
Tickets:
LOAD
*,
num(create_time) & '|' & num(change_time) as KeyFromToDate
FROM file.qvd;
TempIntervalMatch:
IntervalMatch(DateNum)
LOAD Distinct
num(create_time) as Start,
num(change_time) as End
Resident Tickets;
IntervalMatch:
LOAD Distinct
Start & '|' & End as KeyFromToDate,
DateNum
Resident TempIntervalMatch;
Drop Table TempIntervalMatch;
This will create a intermediate table between Tickets & Master Calendar so that you will have id corresponding to every date between start date & change date.