Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I need to accomplish the following but I am facing some issues.
1. Start Shift : 06:00:00
2. End Shift: 16:00:00
3. I need to count missed chats, if the chat arrived outside the shifts, should be categorized as OOO, if the chat was missed within business hours should be categorized as Missed chat.
How can I accomplish that?
Thanks in advanced.
Maybe try something like the below statement into your load script.
If([ChatMissed] = True, If([ChatTime] >= [ShiftStart] AND [ChatTime] <= [ShiftEnd] , ‘Missed Chat’, 'OOO'), ‘Answered Chat’) AS ChatCategory
Hi I tried that, but by any reason is not working, not sure if that could be related to the ChatTime format, as it comes from a Datetime field.
Thanks,
First you can generate missing dates and count then using?
Count({<DateField = {"=Sum(Measure)=0"}>} DateField)
Hi Andres,
Sorry to hear it didn't work as expected. When you say "it is not working" what exactly do you mean? Is the statement always evaluating to false making all the results appear as though all the chats were of type “Answered Chats”?
To find out where the issue resides, I would suggest testing each condition independently and identify which ones are misbehaving. If I was guessing, I would suspect your shift start / end is a date and your actual shift information is stored as a datetime. If that is the case, you need to extract the time portion of the chat for the comparison.
Example of independent condition testing:
If([ChatMissed] = True,’TRUE’,’FALSE’) as BooleanMissedChat,
If([ChatTime] >= [ShiftStart] ,’TRUE’,’FALSE’) as BooleanChatTimeGreaterThanShiftStartTime,
If([ChatTime] <= [ShiftEnd] , ’TRUE’,’FALSE’) as BooleanChatTimeLessThanShiftEndTime
Might try:
If([ChatMissed] = True, If(frac([ChatTime]) >= [ShiftStart] AND frac([ChatTime]) <= [ShiftEnd] , ‘Missed Chat’, 'OOO'), ‘Answered Chat’) AS ChatCategory
Hi William,
I tested your conditions above, again getting no results, i tried on both Qlikview and Qlik Sense not results.
I detail I forgot to add, I Set to variables for the time Shift:
SET StartShift = '06:00:00'
SET StartShift = '16:00:00'
My Datetime field, I am using the Time function to extract the Hours portions in 24 hours format.
I am guessing has to any formatting.
Hi William,
You nailed it, Thanks a Lot.
Regards