Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Not linking correctly

Hi all,

I am new to qlikview, but managed to follow some examples using pre-defined example databases.

Now I want to try with my "real" data, and I have three tables: PRODUCTS, CUSTOMER, ORDER. The ORDER contains information about what has been sold and to whom, like this:

PRODUCTS

Prod_nr

ORDER

Order_nr

Cust_nr

Prod_nr

CUSTOMER

Cust_nr

In a relational database, this cause no trouble, but in qlikview it does not work. There is a link between the tables, but if I click on Cust_nr it will not show me the the product number, and vice versa.

Any advice? Is there anyway I can override the settings in Qlikview or at least see how it links it all together?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,


That's correct, you have to rename the fields.

Maybe someone else can give you an alternative, but renaming the fields will do the job.

Henco

View solution in original post

7 Replies
Anonymous
Not applicable
Author

Could you please share the table view with us?

Press ctrl + t when you are in QlikView desktop, and you will get the table view.

Kind regard,

Henco

Not applicable
Author

The tables are called differently than in my example, but basically one contains sales orders, one products and one is a link between them.

I have found that it happens if I try to select everything from all three tables it doesnt work. If I select only some fields, it works, but I would like to select all. It is a not a lot of data that I have.

Here is the qlikview image:

Screen064.jpg

Here is the Crystal Report image which shows the link that shoule be there. (Joins on ART NR and DOKNR).

Screen065.jpg

Any help is greatly appreciated!

Anonymous
Not applicable
Author

Hi Mace,

Check the attached example. I think that is what you want to have?

Kind regards,

Henco

Not applicable
Author

Oh sorry... I am still trying this out so I am only on the Personal Edition and can't open other users files... any chance that you could copy-paste the script or a small explanations?

I will award points of course. Thank you so much for helping me!

Anonymous
Not applicable
Author

The script is made by inline tables.

If you want to link a table to another one, you have to make sure that the names are the same.

Check the attached image.

Copy paste this in the QV editor (ctrl + E) and reload the script.

You will get the schema as attached.

CUSTOMER:

LOAD * INLINE [

    NAME, CITY, NUMBER

    Cust_A, Birmingham, 001

    Cust_B, Bristol, 002

    Cust_C, London, 003

    Cust_D, Southampton, 004

];

ORDER:

LOAD * INLINE [

    ORDERNR, NUMBER, PRODNR

    Ord_001, 001, A

    Ord_002, 001, A

    Ord_003, 001, B

    Ord_004, 002, B

    Ord_005, 003, A

    Ord_006, 003, C

    Ord_007, 004, A

    Ord_008, 004, B

    Ord_009, 004, C

    Ord_010, 004, D

];

PRODUCTS:

LOAD * INLINE [

    PRODNR, PRODNAME

    A, Product_A

    B, Product_B

    C, Product_C

    D, Product_D

];

Table schema.gif

Not applicable
Author

The fields are named the same, but it seems like there are too many fields with the same name, thus creating too many links. I would like to tell Qlikview to ignore all links except one - am I right that this means I will have to rename all fields that should not be linked?


For example, there is a sum-field, which should - naturally - not be linked. I suppose the only way to avoid a link is to rename one of the sums?

I only get this error when I select all fields in all tables, if I limit the choice it works better.

Thank you for your response.

Anonymous
Not applicable
Author

Hi,


That's correct, you have to rename the fields.

Maybe someone else can give you an alternative, but renaming the fields will do the job.

Henco