Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Period Ranges

Hi Experts,

My Scenario:

I have to display more than 75% as Distinction, between 60-75% as Pass and less than 60% as Fail. My script as follows

If(Grade> 0.75, 1, 0) AS Distinction,

If(Grade>= 0.60 AND Grade<=0.75, 1, 0) AS Pass,

If(Grade< 0.60, 1, 0) AS Fail;

But not achieving the result.

Thanks in Advance!!

2 Replies
settu_periasamy
Master III
Master III

Try this..

if(Grade >0.75, 'Distinction',

     if(Grade >=0.6 and Grade<=0.75, 'Pass', 'Fail')) as Stu_Grade

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

You must try nested if statement like below.

If(Grade> 0.75, 'Distinction', If(Grade>= 0.60 AND Grade<=0.75, 'Pass',if(Grade< 0.60, 'Fail'))) as Result

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!