Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
May 18th 10AM ET, Live Chat, bring your QlikView questions. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

exclude values

Hello all,

I can't get the excluded values from a table that contains user details!

I have table named users with ID, Name etc,

I have a reluserdata with relid, Id_user this is 1:1 with users table

and another table data that contains relid, id_value_data, description, etc. This is 1:N with  reluserdata

So i have users that have the id_value data 10 that stand for Proffession and  other that don't have yet a proffession so don't have the field 10! Almost all users have some data fileld!

When i select the id value 10 it return me 250 users from a total of 500 and it's correct but if i exclude the id_value 10 it returns me all 500 and not the remaining 250!


How can i get that?

Thanks to all and if you don't understand my bad english i'll try to explain better!

14 Replies
pokassov
Specialist
Specialist

count({$<id=-{10}>} Name)

pokassov
Specialist
Specialist

t1:

LOAD * Inline [

T1, T2, T3

1, 10, 1

2, 5, 1,

3, 8

];

first expression shows 15:

=sum({$<T3={1}>}T2)

second expression shows 8:

=sum({$<T3=-{1}>}T2)

Not applicable
Author

I dont need to sum or count them! i need to view all the user data in a table, so if i select the id_value 10  it show me only the users that have in the table data(that is many to 1 user) id_value 10. How can i do the same for showing only those who dont have id_value=10 becouse now if i made and excluded selection it show me all of them because an user can have many id_value.

EXample:

users:

id,name,age

1,Tom, 22

2,John,24

3,Daniel, 18

reluserdata:

userid,relid

1,112

2,113

3,114

data:

relid,id_value,desc

112,10,IT

112,15,male

113,15,male

114,15,male

so if i select the user who have id value 10 it gives me Tom so only one

But if i select exclude 10 it gives me all of the beacouse id_value has data!

how can i made to show me only the rest of them: John and Daniel

pokassov
Specialist
Specialist

1. add listbox with id_value

2. select 10

3. right mouse click and select excluded?

Not applicable
Author

Don't work, same result!

I can do it in sql but i need something similar in qw

something like that:

SELECT u.*
 
FROM Users u
WHERE u.id NOT IN
  
( SELECT d.user_id
  
FROM Documents d
  
WHERE d.value_id =10
  
)

pokassov
Specialist
Specialist

Hi! Add your qvw file.

Not applicable
Author

I can't! it contains user data and other sensible data!

I wrote you the sql query! In qlikview is it possible to do that? to exclude fields of a previous select?

pokassov
Specialist
Specialist

Create sample document.

Digvijay_Singh
Master III
Master III

Hi,

Your users and reluserdata are not showing same field name for association, I think id of first table should be 'userid' or other way round.

Also relid 112 is linked to both 10 and 15 id value in last table, thats why it is picked for both 10 and 15. Because both are linked to  ID value 1 or 'Tom'.