Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
WHEN ROI_NBR_SESSIONS_2013.ITEM_ID = 'LR_R6R7'
AND (ROI_NBR_SESSIONS_2013.ACCOUNT_NO LIKE '00074%'
OR ROI_NBR_SESSIONS_2013.ACCOUNT_NO LIKE '00075%'
OR ROI_NBR_SESSIONS_2013.ACCOUNT_NO LIKE '0008%')
THEN SUBSTR(ROI_NBR_SESSIONS_2013.ACCOUNT_NO,1,11)
I'm assuming you are wanted to write this in an expression in the UI. I also assumed your field names are in the table.field structure because you used the Qualify statement:
If( ROI_NBR_SESSIONS_2013.ITEM_ID = 'LR_R6R7'
AND (ROI_NBR_SESSIONS_2013.ACCOUNT_NO LIKE '00074*'
OR ROI_NBR_SESSIONS_2013.ACCOUNT_NO LIKE '00075*'
OR ROI_NBR_SESSIONS_2013.ACCOUNT_NO LIKE '0008*')
, Left(ROI_NBR_SESSIONS_2013.ACCOUNT_NO,11))
If your fields are loaded into QlikView just a fields names (this is the default) then drop the table names from above. I.e. replace ROI_NBR_SESSIONS_2013.ACCOUNT_NO with
ACCOUNT_NO
I think the match function can help you with the or part of the expression
The wildmatch function performs a case insensitive comparison and permits the use of wildcard characters ( * and ?) in the comparison strings.
wildmatch( M, 'ja*','fe?','mar')
returns 1 if M = January
returns 2 if M = fex
If( ROI_NBR_SESSIONS_2013.ITEM_ID = 'LR_R6R7'
AND wildmatch(ROI_NBR_SESSIONS_2013.ACCOUNT_NO, '00074*', '00075*', '0008*')
, Left(ROI_NBR_SESSIONS_2013.ACCOUNT_NO,11))