Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

if condition

Hello guys,

how to make this condition using if..else :

profit range between 1000 to 2000 then status is : acceptable.

profit range between 2000 to 3000 then status is : above average.

profit range between 3000 to 4000 then status is : exceeds expectation.

thanks

3 Replies
rajeshvaswani77
Specialist III
Specialist III

if((prange>=1000 and prange<=2000), 'acceptable',if((prange>2000 and prange<=3000),'above average',if((prange>3000 and prange<=4000),'exceeds expectation','NA')))

jagan
Luminary Alumni
Luminary Alumni

Hi,

Use this expression

If (profitRange > 3000 AND profitRange <= 4000, 'exceeds expectation',

     If (profitRange > 2000 AND profitRange <= 3000, 'above average',

     If (profitRange > 1000 AND profitRange <= 2000, 'acceptable', 'N/A')))

Regards,

Jagan.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     I think this expression is enough for you.

    

If (profitRange > 3000, 'exceeds expectation',

     If (profitRange > 2000 , 'above average',

     If (profitRange > 1000, 'acceptable', 'N/A'))) [as FieldName] use this alias part if your using it in load script.

Celambarasan