Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to write multiple IF conditions in the LOAD statement

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

1 Reply
Not applicable
Author

I am not an expert by any means - but this linked helped me:

A little tool for creating nested if-statements