Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Replace Synthetic Key with LinkTable

Dear QVExperts,

How to replace the Synthetic Table with LinkTable.

Can you please suggest me on this.

Syn.jpg

Thanks

Sasi

1 Solution

Accepted Solutions
engishfaque
Specialist III
Specialist III

Dear Sasi,

Kindly find attached App, I hope you are looking for that one.

Kind regards,

Ishfaque Ahmed

View solution in original post

13 Replies
marcus_sommer

I wouldn't use a link-table approach and rather concatenate or maybe join these table:

Match:

Load * From Sales;

     concatenate

Load * From Return;

     concatenate

Load * From Incentive;

Here could find many examples how to develop datamodels: Get started with developing qlik datamodels

- Marcus

Anonymous
Not applicable
Author

Marcus is absolutely correct in suggesting you should combine your data into a single table.

But as aside you could convert your [Year} and [Month] fields into a single MonthName field like this :

     MonthName(Date#(Year&Month,'YYYYMMM')) as MonthName

Not applicable
Author

Thanks Marcus & Bill.

In DataModel, The Synthetic key is removed. But in the Document, two list boxes are expected, Year & Month.

When i split using Left or Right Function, Any one of the List Box is functioning. Either Year or Month.

Can you please suggest me on this.

Thanks

Sasi

jagan
Luminary Alumni
Luminary Alumni

Hi,

There is no need of Link Tables every time, you can manage this type of data by concatenating all the tables into one.  Check script below

Data:

LOAD Year,

    Month,

    Sales

FROM

[Sample.xlsx]

(ooxml, embedded labels, table is A);

Concatenate(Data)

LOAD Year,

    Month,

    Return

FROM

[Sample.xlsx]

(ooxml, embedded labels, table is B);

Concatenate(Data)

LOAD Year,

    Month,

    Incentive

FROM

[Sample.xlsx]

(ooxml, embedded labels, table is C);

Please find attached file for solution.

Regards,

Jagan.

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Hi sasi,

To avoid systhatic keys ,

Use concatenate and Join Between those table, your problem will resolve.

-Nagarjun

engishfaque
Specialist III
Specialist III

Dear Sasi,

Kindly find attached App, I hope you are looking for that one.

Kind regards,

Ishfaque Ahmed

rajeshforqlikvi
Creator
Creator

Yes Marcus solution is correct we need to approach concatenation option.

rajeshforqlikvi
Creator
Creator

Use like this:

Sales:

LOAD Year,

     Month,

     Sales,

    'Origin' as Sales

FROM

(ooxml, embedded labels, table is A);

Return:

Concatenate

LOAD Year,

     Month,

     Return,

     'Origin' as Return

FROM

(ooxml, embedded labels, table is B);

Incentive:

Concatenate

LOAD Year,

     Month,

     Incentive,

  'Origin' as Incentive

FROM

(ooxml, embedded labels, table is C);

by doing this way you can set set analysis very easy way.....

PradeepReddy
Specialist II
Specialist II

Concatenation of tables is good option here..

If u don't want, the Sales/Return/Incentive as 3 separate columns.., create a separate Flag field and one Value field

please find the attached file..