Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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

Maybe with:

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

- Marcus

View solution in original post

1 Reply
marcus_sommer

Maybe with:

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

- Marcus