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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Can someone please help with my Qlik syntax?

Hi there,

I am trying to create a new field (variable) with three inputs. The code I developed below is not working for me

if (((PATIENT_SEVERITY='CRITICAL' OR PATIENT_SEVERITY='HIGH') AND (PATIENT_PRIORITY='1' OR PATIENT_PRIORITY='2')), 'high_sev_high_pri',

     if (((PATIENT_SEVERITY='LOW') AND (PATIENT_PRIORITY='4' OR PATIENT_PRIORITY='5'), 'low_sev_low_pri', 'other'))) as sev_priority

Any help appreciated

2 Replies
tresesco
MVP
MVP

May be this?

if ((PATIENT_SEVERITY='CRITICAL' OR PATIENT_SEVERITY='HIGH') AND (PATIENT_PRIORITY='1' OR PATIENT_PRIORITY='2'), 'high_sev_high_pri',

     if (PATIENT_SEVERITY='LOW' AND (PATIENT_PRIORITY='4' OR PATIENT_PRIORITY='5'), 'low_sev_low_pri', 'other')) as sev_priority

arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Theresa,

May be pick function work for you:

PICK( wildMatch('$(vExpression)','Order Value','No of Orders') , SUM(ORDER_AMOUNT) , COUNT(ORDER_ID))



Thanks,

Arvind Patil