Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If statement

This if statement is not working.

I am not getting an error, but it is not returning the values I am expecting.

if(ACCNUM  = '1US002', (if( HUB = 'CPT' , 'USC'))) ,

5 Replies
Anonymous
Not applicable
Author

try this:

if(ACCNUM  = '1US002' or HUB = 'CPT' , 'USC')

ganeshreddy
Creator III
Creator III

May be try this

if(ACCNUM  = '1US002', if( HUB = 'CPT' , 'USC','No Data'),'No Data') ,

maxgro
MVP
MVP

if(ACCNUM  = '1US002' and HUB = 'CPT' , 'USC', 'boh')

sunny_talwar

What are you seeing and what do you expect to see?

effinty2112
Master
Master

Hi Robyn,

Your expression boils down to this:

if(CCNUM  = '1US002' and HUB = 'CPT', 'USC')

which may be easier to read and figure out what's going on.

Cheers