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: 
cacciad
Contributor II
Contributor II

conditional calculation

hello , can you help me .. I 'm starting on qlik sense.

 

I want  to calculate a field but only under conditions.

if the flied COMMENTAIRE is different if 100% then I calculate a difference between today and a particular limit date.

I can figure out what's wrong .. can you help me ? merci ! daniel 

if COMMENTAIRE <> '100%' then
= DATE_PREAVIS-Date(Now());
end if

Labels (1)
1 Solution

Accepted Solutions
Taoufiq_Zarra

Parfait

if(wildmatch(COMMENTAIRE, '*100%*')>0,DATE_PREAVIS-today())

 

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

5 Replies
Taoufiq_Zarra

if i understood correctly maye be :

if(wildmatch(COMMENTAIRE, '*100%*')>0,DATE_PREAVIS-today())

 

sinon tu peux partager un exemple de donnée pour voir claire

 

Regards,
Taoufiq ZARRA

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

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

merci  infiniment ..je vais tester !..

cacciad
Contributor II
Contributor II
Author

fabulous ! it works  taouifiq!

 

if I want to test several values what would be the right coding ?

 

=if((wildmatch(COMMENTAIRE, '*0%*')>0) or ((wildmatch(COMMENTAIRE, '*25%*')>0)),DATE_PREAVIS-today())

would that work ?

cacciad
Contributor II
Contributor II
Author

workss perfectly ! many  thanks again .

 

I have ecluded the 100% value

=if(wildmatch(COMMENTAIRE, '*100%*')=0,DATE_PREAVIS-today())

 

parfait ! 

 

Taoufiq_Zarra

Parfait

if(wildmatch(COMMENTAIRE, '*100%*')>0,DATE_PREAVIS-today())

 

Regards,
Taoufiq ZARRA

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

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