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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Duration between time

Hello folks,

Trying to calculate difference between start time and end time (conditions as given in back-end script) but not getting proper output.

Please find below attached screen shot of current issue as well as attaching QVF with sample data QVD.

Thanks in advance.

NPSS.png

1 Solution

Accepted Solutions
raman_rastogi
Partner - Creator III
Partner - Creator III

As Justin and Tim already mention your raw data is not in proper format to calculate duration.

check attached may be it would be helpful.

View solution in original post

7 Replies
justinphamvn
Creator II
Creator II

Hi,

I've check the qvf file.

I think the problem is your raw data, because 1 message not include a both Start & End then data always have >1 rows (1 Start, 1 End) then duration is not calculate.

Justin.

timpoismans
Specialist
Specialist

As Justin said, the raw data is in such a format that you can't calculate the duration of a task since you have no link between the start and end of a task.

As there is no link, you have no way of telling which Start Time and End Time belong to which task, and thus, you won't be able to calculate the duration of said task.

Anonymous
Not applicable
Author

Thanks Justin and Tim, for response.

Your observation is correct but is there any way to achieve above stated scenario. As I am using qlik log files and wanted to implement same.

It would be highly appreciate sample data and desired output from your side.

Thanks again !

Yogendra  !

raman_rastogi
Partner - Creator III
Partner - Creator III

As Justin and Tim already mention your raw data is not in proper format to calculate duration.

check attached may be it would be helpful.

Anonymous
Not applicable
Author

Thanks Raman for response

timpoismans
Specialist
Specialist

I don't have my own log file at hand, but if the log data is exactly structured as in the qvd you provided, there is no way to achieve a duration for every task, as there is no task ID (for example) that tells us which StartTime and EndTime are of the same task.

Sort of a desired output perhaps:

    

TaskIDSourceDateTimeTypeMessage
1Service4/01/20171:18:30MessageStart Load Task
1Service4/01/20171:18:30MessageEnd Load Task
2Service4/01/20171:18:30MessageStart Execute Task
3Service4/01/20171:18:30MessageStart EqtyDeficitSumReport
4Service4/01/20171:18:30MessageApply filter: ESD Filter
5Service4/01/20171:18:30MessageFilter field: DATENum {num(max({1} DATE))} ()
6Service4/01/20171:18:30MessageFilter field: View Type {GM View} ()
7Service4/01/20171:18:30MessageFilter field: OnePagerReport {P&L as % of Prev NLV is < Y >Z and Loss more than X} ()
8Service4/01/20171:18:30MessageReport type: Excel Workbook (Excel Workbook)
9Service4/01/20171:18:31MessageProducing report: EqtyDeficitSumReport
9Service4/01/20171:18:44MessageReport produced: EqtyDeficitSumReport
10Service4/01/20171:18:44MessageCreating report: EqtyDeficitSumReport
10Service4/01/20171:18:44MessageReport created : EqtyDeficitSumReport
3Service4/01/20171:18:44MessageEnd EqtyDeficitSumReport
2Service4/01/20171:18:45MessageEnd Execute Task

With the ID, you could work with Max and Min of Time and calculate a duration per TaskID.

As long as you don't have such an ID, it's sadly not possible.

At least as far as I know, that is.

Regards,

Tim P.

Anonymous
Not applicable
Author

Yes Tim , unfortunately TaskID  is not present in log file in my case.

Thanks for elaboration Tim .

Thanks and regard,

Yogendra Wasaikar