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

If Statement

Hi All

I am trying to create an IF Statement

if (StatusDesc = 'BI: BAU - PRIORITY',1),

  if (StatusDesc = 'BI: DEV - PRIORITY',2),

  if (StatusDesc = 'BI: SALES - PRIORITY',3),0 as PriorityStatus,

what am i doing wrong?

Thanks All

Adil

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

try this:

if (StatusDesc = 'BI: BAU - PRIORITY',1,

  if (StatusDesc = 'BI: DEV - PRIORITY',2,

  if (StatusDesc = 'BI: SALES - PRIORITY',3))) as PriorityStatus,

View solution in original post

7 Replies
Anonymous
Not applicable
Author

try this:

if (StatusDesc = 'BI: BAU - PRIORITY',1,

  if (StatusDesc = 'BI: DEV - PRIORITY',2,

  if (StatusDesc = 'BI: SALES - PRIORITY',3))) as PriorityStatus,

Anonymous
Not applicable
Author

Thanks Balraj for quick and correct response!

tamilarasu
Champion
Champion

Try any one of this method,

Pick(Match(StatusDesc, 'BI: BAU - PRIORITY','BI: DEV - PRIORITY', 'BI: SALES - PRIORITY')+1,1,2,3,0) as PriorityStatus,

If (StatusDesc = 'BI: BAU - PRIORITY',1,

  If (StatusDesc = 'BI: DEV - PRIORITY',2,

    If (StatusDesc = 'BI: SALES - PRIORITY',3,0))) as PriorityStatus,

Not applicable
Author

if (StatusDesc = 'BI: BAU - PRIORITY',1,

  if (StatusDesc = 'BI: DEV - PRIORITY',2,

  if (StatusDesc = 'BI: SALES - PRIORITY',3,0

)))as PriorityStatus,

Anonymous
Not applicable
Author

Anonymous
Not applicable
Author

Thanks for the help

Anonymous
Not applicable
Author

Thanks for the help