4 Replies Latest reply: Apr 19, 2016 5:56 AM by Andrew Mein RSS

    complex if statement with interval - qlik sense

    Joanna Seldon



      I am trying a complex expression with a if statement with interval.


      I have a person who records room temperature at different intervals of the day.


      i have an expression


      interval(min({<Temp={'40'}>} ObserveDateTime) - min({<Temp={'>40'}>} ObserveDateTime) ,'h:mm' )


      this records how long it takes for a room to reach 40 in temperature


      usally from observe number 1 to the observation number when temperature has been met. e.g 1 - 5


      recorded by ObserveNumber 1, 2, 3 ect


      This above works fine however, sometimes a recording has been done before opening time


      i wish to create an if statement like


      sum(if(min(ObserveDateTime)  < OpeningDateTime , then start from ObserveNumber 2 instead of number 1


      please help