Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Highlighted
capriconuser
New Contributor III

where condition in dimension

I have a script but i dont want to write where condition in this script  

i have dimensions like these

ID

Name 

Type

there is 3 types of people now i want only 3 type in table but i dont want to put where condition in script because this table is associated with other tables so i am trying to filter it out on TYPE dimension how i done this 

any help ?

??

9 Replies
pradosh_thakur
Honored Contributor II

Re: where condition in dimension

Assuming you want a,b,c you can do the following.

inner join (Your_source_table)

load * inline [

Type

a

b

c

];

 

Learning never stops.
capriconuser
New Contributor III

Re: where condition in dimension

no i dont want like that i want to filter it our on dimension not on script .. 

 

i have data like this 

type 

1

2

3

 

 i add dimension TYPE then from that i only want 3 

i dont want to where condition in script 

pradosh_thakur
Honored Contributor II

Re: where condition in dimension

try this in filter

if(type=3,type,null()) 

Learning never stops.
jyotiwagde
New Contributor

Re: where condition in dimension

if(type=1 or type=2 or type= 3 ,type) 

capriconuser
New Contributor III

Re: where condition in dimension

this is not working

jyotiwagde
New Contributor

Re: where condition in dimension

if type field is in Text format put it in ' '(Single quote) 

capriconuser
New Contributor III

Re: where condition in dimension

i did that but not working 

if(type='3',type)

pradosh_thakur
Honored Contributor II

Re: where condition in dimension

What exactly is the requirement? you are writing two fields type and TYPE. which is confusing . PLease state your requirement clearly to help you better. the above solution should have worked.
Learning never stops.
capriconuser
New Contributor III

Re: where condition in dimension

type is TYPE is same .. 

look there is the data in TYPE column I.E. 1,2,3 now i want 3 type in my data like with this i have a separate columns from different tables 

i,e, 

name     country      address               type 

abc           US           none                      1

xyz           UAE         abc_address     3

def          MAL       gh_Address         2

and so on data 

 

type typename

1          low

2          high

3         medium 

 

 

now i add script like this 

 

load name , country , address type from abc_file 

and on the other tab 

load type,typename from type_file 

 

 

now if i only want data type 3 is supposed to write script like this 

load name , country , address type from abc_file   where type=3

but i dont want like this 

 

i add table then i add dimensions i.e. name and type so now on that type dimension how i add where condition  ?

 

Community Browser