Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
zahidrahim_ocp
Partner
Partner

Circular Reference between 2 Fact Tables

Hello,

I want to join two fact tables (sale and targets) using two keys but it is making a circular reference. 

qvf is attached for your reference.

Please help.

Regards,

Zahid Rahim

 

 

Labels (1)
6 Replies
petter
MVP
MVP

You already seem to have a valid data model with no circular reference connecting the Sales and Target tables in a valid way... So could you explain a bit more about which fields you need to use and how the tables would have "new" fields to enable maybe a target on a customer level?

zahidrahim_ocp
Partner
Partner
Author

I want to join the date as well as i show in new attached file. So that sale and target can be seen against one month.
martinpohl
Partner
Partner

Hi,

if you want to compare different fact values (actual and budget) you have to load them into ONE fact table.

You can achieve this by concatenate (table) load 

In your case, you have actual on customer an target on territory. This won't work by concatenate only.

So you have to load actual, join territory by customer into actual table and then concatenate load target.

then you will have one table with

date

customerid

territoryid

actual 

budget

and you can create a chart with actual and target by territory.

Regards

zahidrahim_ocp
Partner
Partner
Author

Thank you Martinpohl,

Can i achieve the same using Link table as in real scenario i have many dimensions linked with both fact tables. so i made a simple one just to understand the solution to such problems.

Taking so many tables in one using concatenate also reduces performance.

Regards,

Zahid Rahim

martinpohl
Partner
Partner

Hi,

see attached a very simple example

Regards

mark_costa
Partner
Partner

Hi,

We just released a new video in our YouTube channel related to your question.
I hope it helps!

IPC Tips - Removing Circular References
https://youtu.be/s-QA8fbQDC4

 

Regards,

Mark Costa