Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

synthetic key

Hi community!!

As a new user, I still have some concept doubts. Until last week, every qlikview files I did were an analisys from one table: some graphs, some table and some fiels to filter. Easy.

But I want more, and this weekend I´ve been doing some examples to learn and see how qlikview joins few tables, for example two. This morning I explained a problem on a post and somebody answers me that my problem probably were on the synthetic key. He/she helped me to understand and introduce in that new concept for me.

During all day I´ve been looking for and reading some articles or post about synthetic key. But one question, is there any way to filter data not to be so restrictive?

I mean, if a have two tables with fileds:

A.YEAR, A.COMPANY, A.ACCOUNT, A.REST OF FIELDS (with dataset year 2007, 2008, 2009, 2010)

B.YEAR, B.COMPANY, B.ACCOUNT, B.REST OF FIELDS (with dataset year 2008, 2009, 2010)

My SYNTHETIC KEY after load data is YEAR+COMPANY+ACCOUNT.

Then if I select for example an account, my pivot table shows me all the values clasified under other criteria I have defined in B.rest of fields (BENEFIT_CENTER), BUT it doesn´t clasify correctly the values that hasn´t got registers for 3 key fields, For example, 2007 data are group by null value.

I mean, I don´t have three keys to relation several tables, I understand that ONLY HAVE ONE. Is this true? How can I work with more than 2 tables? Is there any way to define manual keys? I´ve read some post but level it´s too high.

Thanks for your answers. Fiber

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello,

It depends on your data model, meaning that that synthetic key is creating for you a key for those three fields named equally.

If just one field is enough to link both tables, then rename the other two fields so the link between both tables will be done through that field. Take into account that if you have both fields with same name, but one of them has null values, it won't link as it won't have any correspondence in the other table.

How would you create the relationship in SQL? That may help also.

Regards.

View solution in original post

2 Replies
Miguel_Angel_Baeyens

Hello,

It depends on your data model, meaning that that synthetic key is creating for you a key for those three fields named equally.

If just one field is enough to link both tables, then rename the other two fields so the link between both tables will be done through that field. Take into account that if you have both fields with same name, but one of them has null values, it won't link as it won't have any correspondence in the other table.

How would you create the relationship in SQL? That may help also.

Regards.

Not applicable
Author

First of all, thanks for your response.

I did some SQL relationship before loading dataset, but I think it was precisely where I complicate my synthetic key. I´m doing some test to load more table than views from my microsoft access to improve on synthetic key creation and clarify it to myself. Until my control of qlikview doesn´t grow up, I´ll have not to complicate relationships.

In time, I bring loading time down from twelve minutes to one and a half.

Thanks!!