Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Issues with data model

Hi,

Below I've attached a picture over a universe in Business Objects. I would like to re-create this in QlikView but have problem with how to handle the 2 facts table (F_SoldInsurance and F_PossibleInsurance). All FK to different dates exists only in one of the fact tables (F_SoldInsurance). If I would like to make calculations with measures from both F_SoldInsurance and F_PossibleInsurance and then be able to filter over time what is the best approach here to model this?

Unfortunately it’s not possible to join them. 

TIA  

Universe.PNG

1 Solution

Accepted Solutions
msheraton
Contributor III

Re: Issues with data model

See the attached file.  I created a link table between the two fact tables...

6 Replies
sujeetsingh
Honored Contributor III

Re: Issues with data model

Nothing clear..plz send the sample

Not applicable

Re: Issues with data model

Ok, let’s say I have two fact tables and two dimensions:

Fact 1:

PK_Fact1,

FK_Dim1.

FK_Dim2,

FK_Date,

Cost

Fact2:

PK_Fact2,

FK_Dim1,

FK_Dim2,

Budget

Dim1:

PK_Dim1

Dim2:

PK_Dim2

FK_Date (Fact1) will be connected with master calendar and I would like to view different dates.

The fact tables is connected through two dimensions tables.

So If I would like to compare cost (fact1) vs. budget (fact2) or make calculations with these fields what’s the best way to solve this?  

shree909
Valued Contributor II

Re: Issues with data model

Hi

Fact 1:

PK_Fact1,

FK_Dim1.

FK_Dim2,

FK_Date,

Cost

Fact2:

join(Fact 1)   here ur making the two table to  make an outer join

PK_Fact2,

FK_Dim1,

FK_Dim2,

Budget

Dim1:

PK_Dim1

Dim2:

PK_Dim2

The 2 fact tables are merges as one table and the dimesnions are joined to their respective fields

which will be star schema///

Hope this helps

msheraton
Contributor III

Re: Issues with data model

See the attached file.  I created a link table between the two fact tables...

Not applicable

Re: Issues with data model

Thanks Shree909,

Unfortunately it’s not possible to join the fact tables, I tried it.

But otherwise that would be a good idea!

Not applicable

Re: Issues with data model

Thanks msheraton!

This solution solved the problem.

Community Browser