Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Bhavya407
Contributor II
Contributor II

Qlik development

Hello Everyone I am practicing sample Daash board I have some date and time columns and how to find out the sla1 time and sla2 time. 

Thank you. 

 

Labels (2)
1 Solution

Accepted Solutions
Bhavya407
Contributor II
Contributor II
Author

I have sample data attached in this page please find out in that we have to find out SLA1 and 2 date along with time. 

Thanks and Regards

View solution in original post

6 Replies
Dalton_Ruer
Support
Support

The best chances for others to help is by providing samples of your data as well as illustrating what you hope for in terms of results. 

SLA as an abbreviation will commonly be thought to mean Service Level Agreement. So those kind of values would be expected to be in your data. So our guess would be that you mean something different like some time value between dates you have. But that's why we would need to see sample values.

Bhavya407
Contributor II
Contributor II
Author

I have sample data attached in this page please find out in that we have to find out SLA1 and 2 date along with time. 

Thanks and Regards

Dalton_Ruer
Support
Support

Looking at the data I'm not exactly sure what you need. Do you need the Time between the Ticket Created Date Time until the Resolved Date Time?

Then I'm guessing you want to see averages for that by the Severity #'s. 

Is that correct?

 

Bhavya407
Contributor II
Contributor II
Author

Thank you sir, 

Yes sir i want time gap of every activity . 

Dalton_Ruer
Support
Support

Qlik retains dates/times as numeric/decimal values. 

So you can always use Date2-Date1 to calculate the difference. 

However, you will just end up with a numeric that probably won't make any sense. Instead the best approach is to use the Interval function so that you can tell it how to format the difference. Notice in the bloew code I've said just give me the difference, and then used the Interval and said "I want the difference between the 2 in MINUTES"

"Ticket processed date time"-"Ticket created date time" as ToProcessNumeric,
Interval("Ticket processed date time"-"Ticket created date time",'mm') as ToProcessMinutes,

IntervalValues.png

 

All good in above screen show. Simple way to show the minutes of difference. But a few of your values yielded giant numbers. If you don't care to see the numbers like this, but instead want to just see AVG times etc, then it's no big deal. But if you want it to be more readable by human beings you can play with the format. 'hh:mm' will get you hours and minutes. You could also go with days 'd h:m'. Notice the spaces to set apart days and that I only used single h and single m this time since and below I don't have the leading 0's like I do above with. 02, 04, 01 etc. For the to process minutes I simply used m as the format, but for ToResolveMinues I used 'd h:m' because it had some giant differences. 

IntervalKPIs2.png

 

Easy breasy to get the difference and format it however, you want the end user to see it. You need to understand that this INTERVAL datatype is a unique thing. So once you begin using it, you need to also use it in any expressions for aggregates. Which is why I purposely used mm in the first screen shot so that you would see it shows it aligned right like a number, but it did show the leading 0 which seems more like text. Notice below I have 3 rows selected with ToProcessMinutes of 61, 9 and 31. But notice below just trying to use SUM isn't going to yiled the correct results. Whearas wrapping the sum with an INTERVAL function and formatting does yield what you would expect. However, what you may think is "why would I show it 101 minutes, instead of 1 hour and 41 minutes?" Which is a good thought. So NOTE you can absolutely use any format for the INTERVAL on your aggregrate expressions. So for the AVG KPI notice I said use minutes and seconds so that I could show the accurate average and not just have things rounded to minutes. 

 

IntervalKPIs3.png

 

 

Bhavya407
Contributor II
Contributor II
Author

Thak you sir