7 Replies Latest reply: Sep 27, 2018 2:36 AM by Yogendra Wasaikar RSS

    Duration between time

    Yogendra Wasaikar

      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

        • Re: Duration between time
          Justin Pham

          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.

          • Re: Duration between time
            Tim Poismans

            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.

              • Re: Duration between time
                Yogendra Wasaikar

                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  !

                  • Re: Duration between time
                    Tim Poismans

                    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.

                • Re: Duration between time
                  raman RASTOGI

                  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.