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

Data on Qlik not showing the relations

Hello

I have a database that holds a lot of tables with defined relationship..

I have connected to the database via OLEDB.  #connection successful

roharohabill.markhamtheresaa

on the frontend, I have created the table to visual the data.

My challenge is I can link the data from different tables

here are sample tables as they are on the

Company Table

vOMLIddAward DatedExpiration Date
iOperator IdvContact TypeIdStatus
Company A04/04/198003/04/20001P1
Company B02/03/199001/03/20103T1
Company C03/04/199002/04/20102P2
Company ZDD/MM/YYYYDD/MM/YYYY3P1

Operator Table

iOperator IdDescription
1Sony
2Samsung
3Nokia

Contract Table   

Contract TypeDescription
PPermanent
TTemporary

Status Table

Contract TypeDescription
1Producing
2Non-Producing

My Proposed Table on Qlik front end

vOMLIddAward DatedExpiration Date
iOperator IdvContact TypeIdStatus
Company A04/04/198003/04/2000SonyPermanentProducing
Company B02/03/199001/03/2010NokiaTemporaryProducing
Company C03/04/199002/04/2010SamsungPermanentNon-Producing

See attached for snapshots

1 Solution

Accepted Solutions
stabben23
Partner - Master
Partner - Master

The model looks good, left join maybe will work, but if I should have done this I should use Applymap.

Don't join - use Applymap instead

View solution in original post

13 Replies
stabben23
Partner - Master
Partner - Master

Hi,

you should rename some of the Fields in Your script.

IOperator Id should have a link in Your model

Rename Contract Type in Contract Table to vContact TypeId

Rename Contract Type in Status Table to Status.

Now you have a Connected model, also rename Description in both tables to Contract_desc and Status_desc or simular. This is to avoid a autolink from qlikview

changename.PNG

akpofureenughwu
Creator III
Creator III
Author

StatusIdDescription
1Producing
2Non-Producing

Contract Table   

VContractType IdDescription
PPermanent
TTemporary

@staffan Johansson... Thank you for spotting those mistakes.. This is actually contract type , statusId for the databases...

I don't understand your solution.. Please throw more light

stabben23
Partner - Master
Partner - Master

Ok, Then you should Rename Status in Company Table to StatusId.

Contract Table will be Connected by default if the key have the same filedname.

You want to show all description in Your table, thats fine, but you must rename all Description in all tables.

Like Description as Contract_desc in cintract table

Description as Status_desc in status table

The use these desc in Your front end table.

stabben23
Partner - Master
Partner - Master

Can you show me a pic of the datamodel from Table viewer

avinashelite

Share a sample file with test data will help you out in building the model

akpofureenughwu
Creator III
Creator III
Author

Here is the drift.... I have rename the table headers to that can link well on the data model view.. (see attached)/

What I need to know is how I can make thesee table communiicate data in the frontend to give me the proposed table.

I am currently using the LEft Join Statement to merge the tables so I can pull data from the contract type table to the company table since they both have vContractTypeId field. (this will make two tables became one)

Is this a good practice? Is there a better solution?

Regards   

akpofureenughwu
Creator III
Creator III
Author

Here is a snapshot

stabben23
Partner - Master
Partner - Master

The model looks good, left join maybe will work, but if I should have done this I should use Applymap.

Don't join - use Applymap instead

stabben23
Partner - Master
Partner - Master

Your expected output in front end should be no problem With this model, just use correct fieldname.