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

Match function IF with AND or OR?

Hi to all.

I have a filter box. I would like to see not the code but their description.

So, for example,  I thought to input this funcion: 

=if(BusinessCode='D','PORTO','MARE')

but, if I'd heve more specifics?

I tried to write this:

=If(Match([CompanyCode],'07') and Match([BusinessCode],'D'), 'PC', If(Match([CompanyCode],'09') and Match([BusinessCode],'D'), 'PC', If(Match([CompanyCode],'10') and Match([BusinessCode],'D'), 'PC', If(Match([CompanyCode],'8') and Match([BusinessCode],'K'), 'RII', If(Match([CompanyCode],'10') and Match([BusinessCode],'II'), '', '')))))

Two questions: is correct this funcion or I have to put also "AND" and so not write three time the same thing with same result =PC?

Is it possible to connect (with funcion 'match') those two fields (CompanyCode and BusinessCode) so if I select (in the main filter box) only BusinessCode = D in this second filter box I will have only PC?

Thanks again for your replies or advises?

ciao

ale

 

1 Reply
alessandro
Contributor III
Contributor III
Author

I had wrong approach. In this way I think is perfect:

=if(BusinessCode='D','PORTO',if(CompanyCode='08','RII','II'))

ciao

ale