Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
ABAZ
Contributor II
Contributor II

CASE WHEN avec qlik sense

Bonjour,

Je souhaite flaguer mes lignes avec la condition suivante:

CASE
    (WHEN CHAMP_1  in (11,12,13,14,20)

     or CHAMP_2 in (11,12,13,14,20)

     or CHAMP_3 in (11,12,13,14,20))

THEN 1

ELSE 0

END

Mais je ne sais pas comment faire sur QLIK.

Merci de vos retours

2 Solutions

Accepted Solutions
Taoufiq_Zarra

avec plaisir

Merci de marquer le topic comme résolu, pour les autres utilisateurs

Cdt,

Taoufiq

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

Taoufiq_Zarra

vérifier juste les données que tu as chargé si satisfait la condition, sinon la fonction est correcte

 if(match(CHAMP_1, '14') and match(CHAMP_2, '0','11', '12', '13', '20') and match(CHAMP_3, '4') and match(CHAMP_4, 'NAME_1', 'NAME_2'), 1,0) as CALCUL,
  

 

datt.PNG

CALCUL retourne des 1 et des 0

datt.PNG

Taoufiq

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

11 Replies
Taoufiq_Zarra

Bonjour,

 

Essaye :

=if(match(CHAMP_1,'11','12','13','14','20') or match(CHAMP_2,'11','12','13','14','20') or match(CHAMP_3,'11','12','13','14','20'),1,0) as Flag,

 

Cdt,

Taoufiq

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
ABAZ
Contributor II
Contributor II
Author

Merci bcp ça marche très bien 😉

Taoufiq_Zarra

avec plaisir

Merci de marquer le topic comme résolu, pour les autres utilisateurs

Cdt,

Taoufiq

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
ABAZ
Contributor II
Contributor II
Author

Bonjour,

 

Je reviens sur ma question mais cette fois il me faut absolument le ANDdans ma requête suivante :

if(match(CHAMP_1, '14')
and match(CHAMP_2, '0','11', '12', '13', '20')
and match(CHAMP_3, '4')
and match(CHAMP_4, 'NAME_1', 'NAME_2'), 1,0) as CALCUL

je n'ai pas de msg d'erreur mais j'ai l'impression qu'il ne prends pas en compte l'ensemble de mes conditions.

Merci

Taoufiq_Zarra

est ce que tu peux partager un exemple de DATA que tu utilises pour vérifier

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
ABAZ
Contributor II
Contributor II
Author

Ci-joint le fichier avec un exemple de donnée.

Merci bcp

Taoufiq_Zarra

vérifier juste les données que tu as chargé si satisfait la condition, sinon la fonction est correcte

 if(match(CHAMP_1, '14') and match(CHAMP_2, '0','11', '12', '13', '20') and match(CHAMP_3, '4') and match(CHAMP_4, 'NAME_1', 'NAME_2'), 1,0) as CALCUL,
  

 

datt.PNG

CALCUL retourne des 1 et des 0

datt.PNG

Taoufiq

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
ABAZ
Contributor II
Contributor II
Author

Bonjour,

J'ai encore des probs et j'me demande s'il comprends bien ce que je lui dis ici en gras:

if(match(FBOOKED_FAMILY_CODE,'0','11','12', '13', '20')
and match(L_FAMILY_CODE,'0','11', '12', '13', '20')
and FBOOKED_EUROCODE <> L_EUROCODE
and match(JOBSTATUS,'4')
and match(ORIGINE, 'BUFFER_TIME', 'REMEDY'), 1,0) as TX_PID_GLASS_HORS_BOL,

J'ai un doute , merci bcp 

Zainab

Taoufiq_Zarra

c'est quoi L_EUROCODE ?

est ce que tu peux partager un sample data from your data source

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉