Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
How to write case statement in qliksense - as I got multiple option
if (CLAIM_STATUS -
Await third party approach
Claim Authorized
Creating
In progress%
THEN 'OPEN')
if (CLAIM_STATUS -
Incorrectly Registered
Not taken up
Not Taken Up – Dormant
Rejected - File Closed
THEN 'CLOSED' )
if(CLAIM_STATUS-
Approval Declined
Finalised - No Cover
Finalised – Repudiated
THEN 'Repudiated' )
Please kindly help me to write the script load in Qliksense . There are three condition.
Thanks in Advance
Try a nested if statement
if(CLAIM_STATUS = 'Await third party approach' or
CLAIM_STATUS='Claim Authorized' or
CLAIM_STATUS='Creating' or
CLAIM_STATUS='In progress%', 'OPEN',
if(CLAIM_STATUS='Incorrectly Registered' or
CLAIM_STATUS='Not taken up' or
CLAIM_STATUS='Not Taken Up – Dormant' or
CLAIM_STATUS='Rejected - File Closed', 'CLOSED',
if(CLAIM_STATUS='Approval Declined' or
CLAIM_STATUS='Finalised - No Cover' or
CLAIM_STATUS='Finalised – Repudiated', 'Repudiated', 'Unknown Status'))) as NewFieldName
Hi
Are you talking about upper and lower case? Then you can use Upper()
If you are talking about case ( SQL), use Pick(Match())
Try a nested if statement
if(CLAIM_STATUS = 'Await third party approach' or
CLAIM_STATUS='Claim Authorized' or
CLAIM_STATUS='Creating' or
CLAIM_STATUS='In progress%', 'OPEN',
if(CLAIM_STATUS='Incorrectly Registered' or
CLAIM_STATUS='Not taken up' or
CLAIM_STATUS='Not Taken Up – Dormant' or
CLAIM_STATUS='Rejected - File Closed', 'CLOSED',
if(CLAIM_STATUS='Approval Declined' or
CLAIM_STATUS='Finalised - No Cover' or
CLAIM_STATUS='Finalised – Repudiated', 'Repudiated', 'Unknown Status'))) as NewFieldName
Can you try this?
IF( CLAIM_STATUS = 'Await third party approach'or CLAIM_STATUS='Claim Authorized'or CLAIM_STATUS='Creating', 'Open'),IF (CLAIM_STATUS ='Incorrectly Registered'
or CLAIM_STATUS='Not taken up'
or CLAIM_STATUS='Not Taken Up – Dormant' ,'CLOSED' ), IF (CLAIM_STATUS ='Approval Declined'
or CLAIM_STATUS='Finalised - No Cover'
or CLAIM_STATUS='Finalised – Repudiated' , 'Repudiated' ))) AS CLAIM_STATUS_FINAL;
Did you try my suggested script?
It should have three conditions as you require. The else clause is the following if statement, with the exception of the last one which is a catchall for unexpected values.
I would suggest using Applymap in this case in qlik script.