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

If condition in filter doesn't work

Hi all, I'm new to Qlik Sense and I have a problem with a filter not working with an If statement, so this is the situation:

1 table SALES which has 2 columns QK_ANAGENT and QK_ANAGENT_2 linked respectively with two tables AGENT and AGENT_2, this is the If statement:

=if(QK_ANAGENT_2 <> 'DFL/0',[AGENT_2.DES_AGENT],[AGENT.DES_AGENT])

so if there is a second agent it must return the second agent description, else the first agent description. The filter is not working. Any suggestions?

Qlik Sense Desktop

#

Labels (1)
1 Solution

Accepted Solutions
marcobis
Contributor II
Contributor II
Author

Thank you all, I have resolved this with a calculated field on the table SALES linked with table AGENT.

View solution in original post

3 Replies
BrunPierre
Master
Master

How about this?

=If(Not Wildmatch(QK_ANAGENT_2 ,'*DFL/0*'),[AGENT_2.DES_AGENT],[AGENT.DES_AGENT])

vinieme12
Champion III
Champion III

can one record in SALES table be associated to more than one record in AGENT and AGENT_2 ?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
marcobis
Contributor II
Contributor II
Author

Thank you all, I have resolved this with a calculated field on the table SALES linked with table AGENT.