Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
P_Kale
Creator II
Creator II

IF condition not working properly

Hi,

In data, under INTERACTIONTYPE column we have 'Request' and blank. But below given IF condition is not giving proper out-put. Only 1 condition is working where ever details are found but, where ever details are blank condition is not working. I have tried it both this way but it is not working.

if(INTERACTIONTYPE <> 'Request','Request_Not_Rceived','Request_Received') as REQUEST_RECEIVED_NOT

if(Len(INTERACTIONTYPE)>5,'Request_Rceived','Request_Not_Received') as REQUEST_RECEIVED_NOT_1

Can you pl help.

Thanks in advance

 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
steeefan
Luminary
Luminary

Some ideas w/o knowledge about the content of the field in question:

 

// Flip condition
if(INTERACTIONTYPE = 'Request','Request_Rceived','Request_Not_Received') as REQUEST_RECEIVED_NOT

// Create a flag
Not(INTERACTIONTYPE = 'Request') AS REQUEST_RECEIVED_NOT

// Extend condition
if(INTERACTIONTYPE <> 'Request' OR Trim(INTERACTIONTYPE) = '' OR IsNull(INTERACTIONTYPE),'Request_Not_Rceived','Request_Received') as REQUEST_RECEIVED_NOT

 

 

View solution in original post

4 Replies
steeefan
Luminary
Luminary

Some ideas w/o knowledge about the content of the field in question:

 

// Flip condition
if(INTERACTIONTYPE = 'Request','Request_Rceived','Request_Not_Received') as REQUEST_RECEIVED_NOT

// Create a flag
Not(INTERACTIONTYPE = 'Request') AS REQUEST_RECEIVED_NOT

// Extend condition
if(INTERACTIONTYPE <> 'Request' OR Trim(INTERACTIONTYPE) = '' OR IsNull(INTERACTIONTYPE),'Request_Not_Rceived','Request_Received') as REQUEST_RECEIVED_NOT

 

 

P_Kale
Creator II
Creator II
Author

Hi Thanks,

I Have tried in all the 3 ways but it is not working.  I unable to understand why formula not able to pick Blank in the column. In excel while exporting I am getting "-" in place of Blank. I have tried by setting condition = '-' too but still it is not working,

steeefan
Luminary
Luminary

"-" is just the representation of a blank or NULL value in a table chart object. It's most likely not the actual value present in your data.

Can you post a snippet of your data, ideally as a file, containing various values for INTERACTIONTYPE?

P_Kale
Creator II
Creator II
Author

Hi,

Thanks. While explaining the scenario I came to know what Mistake I am doing which I have reified.

Now I am getting desired output.