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: 
datanibbler
Champion
Champion

How to quickly find out about keys

Hi,

I have a table and the key is not unique - in some instances, there are two or three records to one key with all the same fields except one.

I would like to quickly find out which field differs to enhance the key - I can generate the system_fields $Table and $Fields and then I would like to have a formula like >> GetpossibleCount($Field) << in the listbox, so that when I select one key, I get one or several field(s) where this says 2 - voila.

Only, it doesn't work so easily: When I write the formula >> GetpossibleCount($Field) << into the listbox >> $Field << and select the corresp, table in the listbox >> $Table <<, this does not change until I select exactly one field in the listbox - then the formula reacts and shows me the correct value.

Can I somehow make this work? It would be much faster than looking through a tablebox when there are a lot of fields ...

Thanks a lot!

Best regards,

DataNibbler

1 Reply
ogautier62
Specialist II
Specialist II

Hi,

not exactly what you want, but near

in dimension:

if(aggr(count( key1), key1,key2,key3)>1,key1&key2&key3)

so you have only your duplicates on concatenate key

in expressions , for each field

if(count(distinct 'a field')>1,1)

so you'll have one for this field if duplicate values, so that means differ

you may write too :

if(count(distinct $(=fieldvalue('your field label',n))) >1,1)

one column for each field, I didn't manage to use rowno()

regards