Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Easy Question

Hi Experts:

I am putting the following code in my dimensions and its sort of working:

=if(REGION<>'ZZ'AND
REGION<>'zz' AND
REGION<>'Dx'AND
REGION<>'Nx' AND
REGION<>'Not Assigned' AND
REGION<>'-',
REGION)

Problem with this code is that there is a NULL value or some value '-' that keeps on showing up. So what I see is :

ON 
QC
WST 
-

only want to choose 'ON', 'QC', and 'WST' in my REGION and nothing else. Not even null values or any value. 

 

Thanks, 

J

 

 

1 Solution

Accepted Solutions
Highlighted
Creator III
Creator III

Use,

Match(REGION,' 'ON', 'QC', 'WST')

and suppress Null


-Somasundaram

View solution in original post

4 Replies
Highlighted
Creator
Creator

Also When I do 'Supress when Values are Null' it works. 

 

Is there a better way to write the code?

Highlighted
Creator III
Creator III

Check the Suppress Null value  property.


-Somasundaram
Highlighted
Creator III
Creator III

Use,

Match(REGION,' 'ON', 'QC', 'WST')

and suppress Null


-Somasundaram

View solution in original post

Highlighted
Partner
Partner

I would set analysis rather than a calculated dimension. it gives better performance (wont matter much if data size is small but its the recommended practice)

just use {<REGION={'ON', 'QC', 'WST' }>} in your expression
or put your code in the load script as a flag column. and use that flag as part of set analysis