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

If statements to determine grouping

Hi Qlik-ers!

Need help formulating this expression to determine grouping for Positive-Negative-Indeterminate outcomes:

= If([Exit Destination]='Permanent housing for formerly homeless persons (HUD)','Positive'

,If([Exit Destination]='Rental by client, no ongoing housing subsidy (HUD)','Positive'

,If([Exit Destination]='Rental by client, with other ongoing housing subsidy (HUD)','Positive'

,If([Exit Destination]='Rental by client, with VASH subsidy (HUD)','Positive'

,If([Exit Destination]='Owned by client, no ongoing housing subsidy (HUD)','Positive'

,If([Exit Destination]='Owned by client, with ongoing housing subsidy (HUD)','Positive'

,If([Exit Destination]='Staying or living with family, permanent tenure (HUD)','Positive'

,If([Exit Destination]='Staying or living with friends, permanent tenure (HUD)','Positive'

,If([Exit Destination]='Jail, prison or juvenile detention facility (HUD)','Negative'

,If([Exit Destination]='Safe Haven (HUD)','Negative'

,If([Exit Destination]='Place not meant for habitation (HUD)','Negative'

,If([Exit Destination]='Deceased (HUD)','Negative'

,If([Exit Destination]='Emergency shelter, including hotel or motel paid for with emergency shelter voucher (HUD)','Negative'

,'Indeterminate')))))))))))))


However, there are different levels of programs and some programs may lead to different results.


Can I have nested IFs such as If([Program]="Emergency"]+[Exit Destination]='Permanent housing for formerly homeless persons (HUD)','Positive'


Please help

2 Replies
sunny_talwar

You can, but it would be like this

If([Program] = 'Emergency' and [Exit Destination] = 'Permanent housing for formerly homeless persons (HUD)', 'Positive' ....

sunny_talwar

I am not sure I understand?