Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
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.
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.
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 !
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.
Thanks Raman for response
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:
TaskID | Source | Date | Time | Type | Message |
1 | Service | 4/01/2017 | 1:18:30 | Message | Start Load Task |
1 | Service | 4/01/2017 | 1:18:30 | Message | End Load Task |
2 | Service | 4/01/2017 | 1:18:30 | Message | Start Execute Task |
3 | Service | 4/01/2017 | 1:18:30 | Message | Start EqtyDeficitSumReport |
4 | Service | 4/01/2017 | 1:18:30 | Message | Apply filter: ESD Filter |
5 | Service | 4/01/2017 | 1:18:30 | Message | Filter field: DATENum {num(max({1} DATE))} () |
6 | Service | 4/01/2017 | 1:18:30 | Message | Filter field: View Type {GM View} () |
7 | Service | 4/01/2017 | 1:18:30 | Message | Filter field: OnePagerReport {P&L as % of Prev NLV is < Y >Z and Loss more than X} () |
8 | Service | 4/01/2017 | 1:18:30 | Message | Report type: Excel Workbook (Excel Workbook) |
9 | Service | 4/01/2017 | 1:18:31 | Message | Producing report: EqtyDeficitSumReport |
9 | Service | 4/01/2017 | 1:18:44 | Message | Report produced: EqtyDeficitSumReport |
10 | Service | 4/01/2017 | 1:18:44 | Message | Creating report: EqtyDeficitSumReport |
10 | Service | 4/01/2017 | 1:18:44 | Message | Report created : EqtyDeficitSumReport |
3 | Service | 4/01/2017 | 1:18:44 | Message | End EqtyDeficitSumReport |
2 | Service | 4/01/2017 | 1:18:45 | Message | End 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.
Yes Tim , unfortunately TaskID is not present in log file in my case.
Thanks for elaboration Tim .
Thanks and regard,
Yogendra Wasaikar