Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Raju_6952
Creator III
Creator III

SLA time

Hi,

 

I have incident creation time field in my data model and have a requirement that need to caculate SLA time remaing for each incident (here SLA time defined is 24 hrs for each incident once the incident is generated).

 

for example my idea is that need to add 24 hrs for each incident and then subtract incident creation time .

 

any suggestions will be highly appreciated.

 

Labels (2)
11 Replies
maheshkuttappa
Creator II
Creator II

Can you post sample data for creation time? 

 

Raju_6952
Creator III
Creator III
Author

Hi @maheshkuttappa ,'

Please find the sample data below for your reference.

 

Raju_6952_0-1698424813520.png

In above case for incident_creation Time I need to add exact 24 hrs for each incident I.e the output required 10/28/2023 5:29:51 PM (which means 24 hours SLA time for that incident after its created.

 

maheshkuttappa
Creator II
Creator II

You use SLATime1 or SLATime 2 . I suggest storing  SLA time as a variable. 

T:
Load
*,
Timestamp(StartTime +'24:00:00','MM/DD/YYYY hh:mm:ss') as SLATime1,
Timestamp(StartTime +'1','MM/DD/YYYY hh:mm:ss') as SLATime2;
;
Load Date#(StartTime,'MM/DD/YYYY hh:mm:ss') as StartTime,
;
Load * Inline
[StartTime
10/28/2023 5:29:51];

 

Raju_6952
Creator III
Creator III
Author

Hi @maheshkuttappa ,

Thnks for the hint but here the start time in inline load should be dynamic for example it should add 24 hrs to the incident creation time .

anat
Master
Master

You can add 1 day to your incident creation time field

Raju_6952
Creator III
Creator III
Author

Hi @anat , 

 

That is where I am struggling, I tried several syntax but that output of after adding 24 hrs is getting wrong 

anat
Master
Master

Timestamp(YourField+Time#(24,'hh'))

anat
Master
Master

LOAD *,Timestamp(StartTime+1,'MM/DD/YYYY hh:mm:ss') as NF;
Load Date#(StartTime,'MM/DD/YYYY hh:mm:ss') as StartTime,
;
Load * Inline
[StartTime
10/27/2023 5:29:51
10/27/2023 5:45:51
];

 

anat_0-1698479348980.png

 

anat_1-1698479366272.png

 

Raju_6952
Creator III
Creator III
Author

Hi @anat

by Using this Timestamp(YourField+Time#(24,'hh'))

start time =Incident_CreationTime

Raju_6952_0-1698489636563.png