Circular References
A Circular Reference is a loop in a data structure. These can occur when the tables are associated in a way where there is more than one path of association between 2 fields
Example where a Circular Reference will occur
- LinkTableProduct
- DateKey → LinkTableCurrency DateKey
- LinkTableCurrency
- LinkTableCurrencyKey → Web Sales LinkTableCurrencyKey
- WebSales
- LinkTableProductKey → LinkTableProduct LinkTableProductKey
Qlik Sense ‘solves’ this problem with a loosely coupled table - denoted by the dotted red line on the model view. The Loosen Table {TABLE_NAME}
script command will remove all associations from that table within the model
Issues With Loosley Coupled Tables
Items can be repeated within a table, this implies that there is more than one path of association between some key within the data. If a piece of data is repeated in a table, this also means it could be repeated within an aggregation, which would be even more difficult to detect.
Fixing a Lossley Coupled Table
The example above included two Link Tables, if we only have a single Link table that will prevent a Circular Reference from appearing. This can be done through CONCATENATE
Approaching Fixing Circular References
When debugging, load your data in stages, so you can see where problems may occur
Remove fields from the load that caused the issue as long as the remove does not cause data loss for the app