1 Reply Latest reply: Sep 16, 2015 12:05 PM by Rob Biagini RSS

    How to write multiple IF conditions in the LOAD statement

    Ravikiran Pat

      In case1 we are filtering for DVR, that is if the condition fails in the first step it will come out of the loop and display some other than DVR.

       

      Case1:

      if(VIDEO_TYPE='DVR',

      if(INDICATOR_ID> 9 ,

      'DVR After 7 Days','DVR Till 7 Days'),VIDEO_TYPE) as VIDEO_PLATFORM

       

      I have to achieve the same functionality as above with meeting the criteria below. Can anybody help me with this

       

      Case2:

      IF ((VIDEO_TYPE='DVR' AND TIMESHIFT_ID> 9) ,'DVR After 7 Days',

      IF((VIDEO_TYPE='DVR' AND NOT TIMESHIFT_ID> 9), 'DVR Till 7 Days',   

      IF((VIDEO_TYPE='OTT/VOD' AND TIMESHIFT_ID> 5 AND STREAM_SOURCE='VOD') ,'VOD Till 3 Days',

      IF((VIDEO_TYPE='OTT/VOD'  AND STREAM_SOURCE='VOD'), 'VOD After 3 Days',

      IF((VIDEO_TYPE='OTT/VOD' AND NOT STREAM_SOURCE='VOD'), 'OTT',                  

      VIDEO_TYPE))))) AS VIDEO_PLATFORM_VOD