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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

In condition

Hi,

How to write the condition in the Expression in Qlikview

Region in ('LA','NJ','AK')

I am getting error if i am using the in condition in listbox.

1 Solution

Accepted Solutions
sparur
Specialist II
Specialist II

Hello, XXX

You can to use a match() function, like as:

IF(Match(Region, 'LA', 'NJ', 'AK') > 0, City)

View solution in original post

6 Replies
sunil2288
Creator III
Creator III

HI XXX,

You can use set analysis to write this expression like

{$<Region={'LA','NJ','AK'}>}

Regards

Sunil

Not applicable
Author

Hi Sunil,

It is not working. Sorry for not mentioning the complete scenario.Actually i am trying like this. List box should show the city of the mention regions

If ({$<Region={'LA','NJ','AK'}>},City)

tresesco
MVP
MVP

Hi,

In that case you can try : If(Region='LA' OR Region='NJ' OR Region='AK', City)

Regards, tresesco

sunil2288
Creator III
Creator III

HI XXX,

I don't think you can write an expression as dimension.

If you want to do like this you can change these thing in the Load script editor..

Like

if

((Region='LA' or 'JN' or 'AK'),cITY) AS Sp_REGION





Regards

Sunil

sparur
Specialist II
Specialist II

Hello, XXX

You can to use a match() function, like as:

IF(Match(Region, 'LA', 'NJ', 'AK') > 0, City)

Not applicable
Author

Thanks Sunil,tresco, Sparur for the solution . It is working as expected.