Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
taz803
Contributor III
Contributor III

case when

i want to do this in qliksense but the  syntaxe is wrong : 

if(Col1 ='N') then  'erreur' ;

if(Col1 ='O') then   'accepted' ;

if other case then 'rejected'

Labels (6)
1 Solution

Accepted Solutions
Chirantha
Former Employee
Former Employee

Please see if this works 

Pick(Match(Col1, 'N', 'O'), 'erreur', 'accepted') & If(not Match(Col1, 'N', 'O'), 'rejected')

View solution in original post

2 Replies
Chirantha
Former Employee
Former Employee

Please see if this works 

Pick(Match(Col1, 'N', 'O'), 'erreur', 'accepted') & If(not Match(Col1, 'N', 'O'), 'rejected')

taz803
Contributor III
Contributor III
Author

Thank you it work  in the visualization mode , 

if i want to add in the sql  request: 

select type , 

Pick(Match(Col1, 'N', 'O'), 'erreur', 'accepted') & If(not Match(Col1, 'N', 'O'), 'rejected') as test_type

 FROM mytable 

==> this request don't work