Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
caloyskicb
New 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

Re: If statements to determine grouping

You can, but it would be like this

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

Re: If statements to determine grouping

I am not sure I understand?