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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

displaying values not in a list box

Hi all,

I have 2 list boxes. which should contain the same set of values.

fielda
1
2
3


fieldb
1
2


These list boxes arent linked in anyway.

How can I then create a list box which only contains values in [fielda] and not in [fieldb]?

thanks

12 Replies
Not applicable
Author

Hi Ealmeida,

it depends on your model, example below

table1:

LOAD * INLINE  [FieldA,ID

A,1

B,2

C,3

D,4

F,6];

table2:

load * Inline [

FieldB,ID

A,1

D,4

E,5

F,6];

gives me this model

uniqueModel.PNG.png

than it is quite easy as the previous posts said:

if(fieldA<>FieldB,FieldA) as an list box gives following

uniqueData.PNG.png

If you do not have a join (association) between the tables than qlikview perform cross join (all combination of fieldA and fieldB - in my case 5x4=20 rows), which brings troubles (even if you can select values in common easily)

If you still suffer with troubles, show the model please.

Regards,

Jan

Not applicable
Author

Hi Jan,

Thanks for your help.

The two fields can not and should not be linked in anyway. This is because when fieldB entries are removed as part of the data reduction process on opening, fieldA still contains all the field entries. Therefore I should be able to use the contents of fieldA and the remains of fieldB to generate a list of differences.

thanks all for your help so far.

let me know if any has a solution.


mark_casselman
Creator
Creator

Hi,

Based on the idea of Fabrice, this works:

= if( not match( FieldA ,  $(=concat({1} chr(39) & FieldB & chr(39) , ',' ) )  ) , FieldA)

the second argument of the match generates the correct string of comma seperated values of B

The result gives a selectable (on field A) listbox with values B and C.

Mark