Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
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
Support
Support

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
Support
Support

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