Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

data modeling for 2 fact tables having same key fields with many dimension tables

Hi All,

I working on a datamodel where I have two fact tables (e.g 1.Corporate Sales Table 2. Customer Sales Table).The problem is that both these tables contain same key fields and I have 6-7 different dimension   tables. As I am trying to create a datamodel, any dimension table is getting joined with both fact tables. In any type of  schema building (star/snow flake) I am getting many loops. PFA example diagram.

Anyone know how to proceed in such kind of scenarios?

Thanks & regards,

Amey pantoji

5 Replies
isaiah82
Creator III
Creator III

Classic question ~ your best bet will be to use a link table.  Do a search for this on the forum and you'll get lots of good hits.  -Isaiah

Not applicable
Author

Thanks.

I will try to search this on forum.

Anonymous
Not applicable
Author

Hi

try to use the Qualify and UnQualify keywords

Regards

Ashok

Not applicable
Author

Hi Ashok,

Even if I use qualify and unqualify keywords in a dimension/fact table, ultimately a dimension table is going to join with both  fact tables. So same issue will persist. Please correct me if i am wrong.

Regards,

Amey

Not applicable
Author

I think the link table Isaiah mentioned is the best idea.

However, if the table schemas are similar, you can concatenate them together and create a new field (called 'RecordType' or something like that) denoting whether a record is for 'Corporate Sales' or 'Customer Sales', and then use that in your chart expressions (either with an IF statment or using set analysis).