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

if and not like..

Hi everybody,

i gat an issue i have a table, and i want to add a field but i don't manage with the conditionnal logics.

FACTURE_INDICATEUR3:

LOAD

   

     FACTURE_INC.GPE_CLIENT,

     FACTURE_INC.CodifCreno,

     Catalogue_marque,

     catalogue_famille,

     if ((catalogue_famille='LEGUMES 4G') and (FACTURE_INC.GPE_CLIENT='RESTALLIANCE') and (Catalogue_marque  not like API* ),'OK','Interdit') as Test

 

FROM

FACTURE_INDICATEUR.QVD

(qvd);

But there is a problem with the not like.. any one can help me?

Thanks you so much ! And sorry for my bad english !

1 Solution

Accepted Solutions
simenkg
Specialist
Specialist

and (not Wildmatch(Catalogue_marque ,'API*'))

View solution in original post

7 Replies
datanibbler
Champion
Champion

Hi sap,

just try WILDMATCH() - combined with NOT, so it would be NOT(WILDMATCH()) - in that, you can use the *

- alternatively, you could use LEFT(Catalogue_marque, 3) to split out those letters which should be > API < ...

HTH

Best regards,

DataNibbler

simenkg
Specialist
Specialist

and (not Wildmatch(Catalogue_marque ,'API*'))

puttemans
Specialist
Specialist

Try the following :

if (catalogue_famille='LEGUMES 4G',

     IF(FACTURE_INC.GPE_CLIENT='RESTALLIANCE',

          IF(not Wildmatch(Catalogue_marque ,'API*')),

               'OK','Interdit'))) as Test

PrashantSangle

Hi,

Try with wildmatch() or match()

Try like

if (wildmatch(catalogue_famille,'LEGUMES 4G') and wildmatch(FACTURE_INC.GPE_CLIENT,'RESTALLIANCE')

and not wildmatch(Catalogue_marque,'API*'),'OK','Interdit') as Test

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable
Author

Try below code :


FACTURE_INDICATEUR3:

LOAD

  

     FACTURE_INC.GPE_CLIENT,

     FACTURE_INC.CodifCreno,

     Catalogue_marque,

left(Catalogue_marque,3) as Catalogue_marque1

     catalogue_famille,

if ((catalogue_famille='LEGUMES 4G') and (FACTURE_INC.GPE_CLIENT='RESTALLIANCE')

and (Catalogue_marque1<>'API' ),'OK','Interdit') as Test


FROM

FACTURE_INDICATEUR.QVD

(qvd);


jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

FACTURE_INDICATEUR3:

LOAD

  

     FACTURE_INC.GPE_CLIENT,

     FACTURE_INC.CodifCreno,

     Catalogue_marque,

     catalogue_famille,

     if ((catalogue_famille='LEGUMES 4G') and (FACTURE_INC.GPE_CLIENT='RESTALLIANCE') and (not Catalogue_marque   like 'API*' ),'OK','Interdit') as Test

FROM

FACTURE_INDICATEUR.QVDu

(qvd);

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Thanks a lot everybody !!!