Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Nested IF Statements

Hello Qlik Users,

I need to have some nested if statements to turn ranges of scores into buckets.

My field is 'Total Score' and I need a bucket for scores greater than 99.99, scores between 99.99-95, and 94-90.

If some one could help with the syntax for multiple if statements that would be great.

Thanks

17 Replies
Anonymous
Not applicable
Author

i want to show status of completed and not completed details if aadhar card, passport, voter id equal to yes

SergeyMak
Partner Ambassador
Partner Ambassador

Hi Tara,

Just because you have comparison by one field, I would use Pick(Match()) or Pick(Wildmatch()) functions, e.g.

Pick(Wildmatch([Expenditure Type],'FB, Classified Staff','FB, Univ Staff', ’Awards & Prizes (Cash)’,'*'),

'FB','FB','Reward &  Recognition’,'Other'

)

It's much shorter and cleaner

Regards,

Sergey

Regards,
Sergey
johnmccdwc
Contributor
Contributor

Thanks.  Solved a similar problem for me.

Anonymous
Not applicable
Author

kelly_oakley
Contributor II
Contributor II

Hi, I have tried your suggestion but Qlik comes up with Error in Expression

=if(JobPartCostAmount<80,'Less than £80',
if(JobPartCostAmount>80.01 and JobPartCostAmount<300),'£80-£300',
if(JobPartCostAmount>300.01 and JobPartCostAmount<600),'£300-£600',
if(JobPartCostAmount>600.01 and JobPartCostAmount<900),'£600-£900',
if(JobPartCostAmount>900.01,'Greater than £900'))

What am I doing wrong?

KishoreSuri
Creator
Creator

It works for me. Thank You

Thanks,
Kishore S
ryan2
Contributor
Contributor

can anyone tell me what exactly the problem is with my nested ifs? I am stuck...

 

if((Avg[F6 Ekran 6 (ar-arcelik_26011897).F6 Ekran 6 (ar-arcelik_26011897).Reel Çevrim])>(Avg([F6 Ekran 6 (ar-arcelik_26011897).F6 Ekran 6 (ar-arcelik_26011897).Hedef Çevrim (%85 OEE)])*1.2),rgb(200,51,51),
if((Avg[F6 Ekran 6 (ar-arcelik_26011897).F6 Ekran 6 (ar-arcelik_26011897).Reel Çevrim])>(Avg([F6 Ekran 6 (ar-arcelik_26011897).F6 Ekran 6 (ar-arcelik_26011897).Hedef Çevrim (%85 OEE)])*0.85),rgb(255,165,0),
if((Avg[F6 Ekran 6 (ar-arcelik_26011897).F6 Ekran 6 (ar-arcelik_26011897).Reel Çevrim])<(Avg([F6 Ekran 6 (ar-arcelik_26011897).F6 Ekran 6 (ar-arcelik_26011897).Hedef Çevrim (%85 OEE)])*0.85),rgb(0,255,0),


)))

klrameet
Contributor III
Contributor III

what's wrong with expression ..

If(Today()-Created<=1,'Today',
If((Today()-Created>1 and Today()-Created<=7),'Week', 'X'))

Getting missing right parenthesis error in data manager