1 Reply Latest reply: Apr 11, 2017 2:10 AM by Guruprem Saginadham RSS

    Moving to a 1s window to a ms window

    Chris Kelley

      I have the following code that enables a timestamp filter to show the values at a 1s time window (I have data well into 20hz):

       

          //ESTABLISH A FILTER THAT ALLOWS FOR DATA AGGREGATION AT AN 1S BASIS

        TIMESTAMP(FLOOR([ts],1/(24*60*60))) as [RESULT TIMESTAMP 1SEC],

       

      Now, I want to also show an aggregation at 10hz (100ms):

       

          //ESTABLISH A FILTER THAT ALLOWS FOR DATA AGGREGATION AT AN 10HZ BASIS

        TIMESTAMP(FLOOR([ts],100/(24*60*60*1000))) as [RESULT TIMESTAMP 10HZ],

       

      I am not getting the results intended. What am I missing in the above code? I suspect I am off on my * or x/ values.

        • Re: Moving to a 1s window to a ms window
          Guruprem Saginadham

          I guess floor is the culprit here.

          In Qlik the decimal part of time is not broken into 24*60*60 secs. What I mean is time(42000.25) will result 6.00.00 hrs. Qlik can calculate the time in millisecond, can you try getting the number whith is equalent to timestamp in milli second then try =timestamp(datetime,'MM/DD/YYYY hh:mm:ss.fff') to print in ms.