Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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 ??

Labels (1)
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