Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
master_student
Creator III
Creator III

IF CONDITION

Hello Guys,

I need to set an if condition in the script :

NoConcatenate

CASES:

LOAD *,

if( Match(PROVIDER_GRP_ID, 'RECL_HV','RECL_MV', 'RECL_LV', 'UDRÉSIDEN', 'URVASRÉSID', 'ESHOP', 'SELF_CARE','RÉCSOCIALM','URCORP','URMOB2C','URVASB2B','MAILING','RECLFACT'),'Mobile','Fixe')

as [Type Acces]

Resident F_TMP_CASES

this script works fine if the result is two option mobile or fixe but i need to add a third option if match (PROVIDER_GRP_ID  'test' then test


how to add it ??

2 Replies
snehamahaveer
Creator
Creator

Hello Wiem,

Why don't you try this.

CASES:

LOAD *,

if(PROVIDER_GRP_ID= 'Test','Test', if( Match(PROVIDER_GRP_ID, 'RECL_HV','RECL_MV', 'RECL_LV', 'UDRÉSIDEN', 'URVASRÉSID', 'ESHOP', 'SELF_CARE','RÉCSOCIALM','URCORP','URMOB2C','URVASB2B','MAILING','RECLFACT'),'Mobile','Fixe') )

as [Type Acces]

Resident F_TMP_CASES;

Regards,

S

stigchel
Partner - Master
Partner - Master

I like to use a mapping load and applymap for this, easier to maintain and more comprehensive than a lot of if's

Something like

Provider:

Mapping Load * Inline [From, To

'RECL_HV','Mobile'

'RECL_MV','Mobile'

'RECL_LV','Mobile'

'UDRÉSIDEN','Mobile'

'URVASRÉSID','Mobile'

'ESHOP','Mobile'

'SELF_CARE','Mobile'

'RÉCSOCIALM','Mobile'

'URCORP','Mobile'

'URMOB2C','Mobile'

'URVASB2B','Mobile'

'MAILING','Mobile'

'RECLFACT','Mobile'

'Test','Test'

];

Load *,ApplyMap('Provider',Data,'Fixed') as [Type Acces];

Load * Inline [Data

'RECL_HV'

'RECL_MV'

'RECL_LV'

'UDRÉSIDEN'

'URVASRÉSID'

'ESHOP'

'SELF_CARE'

'RÉCSOCIALM'

'URCORP'

'URMOB2C'

'URVASB2B'

'MAILING'

'RECLFACT'

'Test'

'NotMobIleOrTest'

];

MapLoadNoIf.png