Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Three table association

Hi, I have 3 SQL tables, where table  B & C are associated to table A via a field that exists in the three tables!

Note that table B and C are not to be associated. For exemple, something like:

TableA - Employee

TableB - EmployeePayments

PK - E

TableC - EmployeeExtraHours

Table B and C primary keys are ID of the employee that is in table A.

When I do the profiling I associate A-B and A-C via the employeeID, but when the profiling tool is testing relation between tables B-C it suggests na association via 3 fields or "No Association"

When I choose "No Association", it suggests I rename the fields (that jave the same name) to break the association... but if I do that I break also the associations between A-C and A-B!!

In one image, I want something like this:

How can I solve this??

Best regards,

Carlos

Tags (3)
5 Replies

Re: Three table association

Perhaps like this:

TableA:

LOAD

     EmployeeID,

     EmployeeID as LinkKeyB,

     EmployeeID as LinkKeyC

     ...other fields...

FROM

     ...

TableB:

LOAD

     EmployeeID as LinkKeyB,

     ...other fields...

FROM

     ...

TableC:

LOAD

     EmployeeID as LinkKeyC

     ...other fields

FROM

...  


talk is cheap, supply exceeds demand
reddys310
Honored Contributor II

Re: Three table association

Hi Carlos,

Gysbert's reply should help you achieve what you are looking for. Also make sure the field names in table B do not match the field names in table C. This will make sure there is no association formed between tables B and C as you wanted.

Thanks,

Sangram

Not applicable

Re: Three table association

Ok, Gysbert, your answer seems it will work, but... am I asking for something so special it can't be done with the normal profiler?? I have a few tables like this one and it would be easier if it could be done via graphic interface!

I'll try your tip and giove feedback. Thanks!

Best regards,

Carlos Silva

reddys310
Honored Contributor II

Re: Three table association

Hi Carlos,

Most of the data model problems can be handled by qlik sense. There are many workarounds to problems we face. If you problem is tough to explain, It would be easy if you can post a sample qvf.

Thanks,

Sangram

Re: Three table association

No, the profiler can't handle these kind of decisions for you (yet).


talk is cheap, supply exceeds demand
Community Browser