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: 
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!!

Labels (1)
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
MVP
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!