5 Replies Latest reply on Oct 31, 2016 7:06 AM by Norbert Maijoor

    How to capture previous value if current value is NULL

    Stan Lee

      Hi Guys,

      Hope someone can assist me on a calculated field. This is actually a predictive task, where i would like to know my current


      DateTimeapi_main (current)p_api_main
      30/10/2016 9:00NULL48
      30/10/2016 8:005050
      30/10/2016 7:004545


      Problem 1:

      As per above table,my api_main have yet to get the actual result for 30/10/2016 9:00, so i would like to create a calc field; if date time selection is 30/10/2016 9:00 and api_main is null, then select date time 30/10/2016 8:00 and api_main = 50


      Time = -1/24 (Date time 30/10/2016 9:00 selection)


      is it possible?


      Problem 2:

      If date time selection is = 30/10/2016 8:00, date will display current date and value :api_main value is not null.

      Date selection: 30/10/2016 8:00 and display api_main = 50 **did not have time = -1/24



      This is the formula i hope:

      if [api_main] <0 then ((MAX([Datetime Predicted])) -1/24)



      Thank you,



      Stan Lee