Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
akpofureenughwu
Contributor 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
Honored Contributor

Re: Data on Qlik not showing the relations

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
Honored Contributor

Re: Data on Qlik not showing the relations

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
Contributor III

Re: Data on Qlik not showing the relations

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
Honored Contributor

Re: Data on Qlik not showing the relations

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
Honored Contributor

Re: Data on Qlik not showing the relations

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

Re: Data on Qlik not showing the relations

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

akpofureenughwu
Contributor III

Re: Data on Qlik not showing the relations

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
Contributor III

Re: Data on Qlik not showing the relations

Here is a snapshot

stabben23
Honored Contributor

Re: Data on Qlik not showing the relations

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

stabben23
Honored Contributor

Re: Data on Qlik not showing the relations

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