Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

CASE statement in QlikSense

HI ,

i need to write case statement in qliksense for below statement

CASE  WHEN column_name  IN ('A-Dallas', 'A-Texas') THEN 'US' end

I tried in qliksense as below, which throwed error and displayed nothing

if(wildmatch([ column_name],'A*', 'US'))

Can anyone please help

1 Solution

Accepted Solutions
sunny_talwar

You have incorrect positioning of the parenthesis

This is incorrect

If(WildMatch([ column_name],'A*', 'US'))

Try this instead

If(WildMatch([ column_name],'A*'), 'US')

View solution in original post

13 Replies
kvanandan1
Creator
Creator

Hi,


Please try


if(WildMatch([column_name],'A*')=1,'US')

sunny_talwar

You have incorrect positioning of the parenthesis

This is incorrect

If(WildMatch([ column_name],'A*', 'US'))

Try this instead

If(WildMatch([ column_name],'A*'), 'US')

Anonymous
Not applicable
Author

How can i deal with blank values

when i have blank i need to get as '1' if have some value then '0'

Anonymous
Not applicable
Author

hi

How can i deal with blank values

when i have blank i need to get as '1' if have some value then '0'

can you please help on this

sunny_talwar

Use Len(Trim()).... for example

If(Len(Trim(FieldName)) = 0, 1, 0) as Flag

Anonymous
Not applicable
Author

Hi

it is throwing error

sunny_talwar

Did you replace Fieldname with your own field?

Anonymous
Not applicable
Author

yes

i used as this

If(Len(Trim(column_name)) = 0, 1, 0)

sunny_talwar

Can you post a screenshot of the error message?