Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

Key issue

Hi,

in a report I'm currently working on, there are three tables from our database.

All three are linked via the item_number, so that has that % prefix.

One of them is the item_master.

When I hover over the keyfield %Item_number in the table_viewer, it says "Key", which means that the field is not unique.

<=> In a straight_table diagram, I can see that with the dimension "item_number" (not the one with the % prefix), there is only

        one line per item_nr - and it's the same when I use the keyfield (with the prefix) as dimension

Can anyone help me here? The keyfield seems to be unique (which it should be in a table labeled *_master) - but in the table_vieweer, QlikView tells me it is not ...

Thanks a lot!

Best regards,

DataNibbler

4 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Key fields are Unique in all databases!

hic
Former Employee
Former Employee

Without the data, it is impossible to say what has gone wrong - if anything.

"Perfect Key" means that the keys are unique and the list is complete.

"Primary Key" means that the keys are unique but the list is incomplete.

"Key" means that the keys are non-unique - there are duplicates.

I would make a chart where you as dimension use the key and as expression use Count(Somefield) to see if your table has duplicates of the key.

HIC

IAMDV
Luminary Alumni
Luminary Alumni

Henric Cronström wrote:

"Perfect Key" means that the keys are unique and the list is complete.

What does "list is complete" mean? Does it mean that the values are present in both the tables and match 100%?

Thanks in advance.

Cheers,

DV

hic
Former Employee
Former Employee

It means that this table contains all values of the field - also all the values of the field in other tables. For example, if you have two tables, each with three records, where one contains the values 'A', 'B' and 'C' and the other contains 'A', 'B' and 'D', then the key is a Primary Key in both tables, but a Perfect Key in neither.

If one of the tables instead has four records and a key with all four values, then it would be a Perfect Key in that table.

HIC