Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

stvn_003
New Contributor II

Problem with Circular References

Hello, I have a problem with circular references does anyone have an idea or suggestion for it?

DERQV.jpg

1 Solution

Accepted Solutions

Re: Problem with Circular References

The Purchase Order Header and the Purchase Order Detail tables could be combined into a single Fact table to be the centre of a Star Schema.

The Customer and Customer Group tables could also be combined into a single Dimension Table.

As Gysbert suggested you could ignore the Customer Product table, so the Product table becomes another Dimension table.

Thus leaving a simple Star Schema with one Fact table and 2 Dimension tables.

5 Replies

Re: Problem with Circular References

You should rethink your data model. There should be only one path from a table to any other table. A Star schema is ideal, limited snowflaking isn't a problem. You also have to consider the synthetic keys. They point out problems with your data model. Try to get rid of them. Perhaps you need a link table with all the key fields and create new key fields to link the tables with the link table. Perhaps this blog post helps explain this concept: Concatenate vs Link Table


talk is cheap, supply exceeds demand
stvn_003
New Contributor II

Re: Problem with Circular References

So the relationship that should create the link tables table?

stvn_003
New Contributor II

Re: Problem with Circular References

These are the tables that I have in the database

QV_duda.jpg

Re: Problem with Circular References

I think I'd get rid of the CustomerProduct table. In your first screenshot there seems to be only one field p_sku_cliente in that table besides the key fields. If you don't use this field for any analysis thenyou don't need the CustomerProduct table. If you do need it for analysis you can probably use a mapping table and the applymap function to add it to the PurchaseOrderDetail table.


talk is cheap, supply exceeds demand

Re: Problem with Circular References

The Purchase Order Header and the Purchase Order Detail tables could be combined into a single Fact table to be the centre of a Star Schema.

The Customer and Customer Group tables could also be combined into a single Dimension Table.

As Gysbert suggested you could ignore the Customer Product table, so the Product table becomes another Dimension table.

Thus leaving a simple Star Schema with one Fact table and 2 Dimension tables.

Community Browser