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: 
Annapurna1
Contributor III
Contributor III

Using nested if conditions

Hi All,

How to use if condition for the below SQL Code

case when b.tenure between 0 and 12 then 'a 0-12'
when b.tenure between 13 and 18 then 'b 13-18'
when b.tenure between 19 and 24 then 'c 19-24'
when b.tenure between 25 and 30 then 'd 25-30'
when b.tenure between 31 and 36 then 'e 31-36'
when b.tenure > 36 then 'f > 36 'else 'z missing' end as Tenure_Bucket

 

Thanks in Advance.

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer
MVP
MVP

Maybe with:

if(Field <= 12, 'a', if(Field <= 18, 'b', ...., 'z'))))))

- Marcus

View solution in original post

1 Reply
marcus_sommer
MVP
MVP

Maybe with:

if(Field <= 12, 'a', if(Field <= 18, 'b', ...., 'z'))))))

- Marcus