Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
viveksingh
Creator III
Creator III

Need help in solving loop

Hi Experts,

I have a loop in  my datamodel. Can any one help me in resolving. Below is the Loop

image.png

 

 

 

Labels (1)
  • loops

9 Replies
Or
Master
Master

Concatenate some of your tables - looks like you can concatenate Channel and Branch into both Data and Budget (assuming you need details from each) or you can just concatenate everything into one table. Have a look at https://community.qlik.com/t5/Qlik-Design-Blog/Fact-Table-with-Mixed-Granularity/ba-p/1468238 and the sample file linked in the comments of that post, as Henric covers it better than I could.

viveksingh
Creator III
Creator III
Author

Thanks for the quick reply. if I concatenate Channel and Branch it again forms a loop with Budget and Data Tables. 

I tried with concatenating all into single table, I'm getting performance issue due to huge data and cannot restrict the data further since I loaded only required data.

Peter_Cammaert
Partner
Partner

It seems like a common Circular Reference problem.

I think Or didn't mean that you should concatenate Channel and Branch, but to Join them into both tables Data and Budget. At the same time, you'll have to rename them so that they do not create additional Links.

Another solution (but a bit more complex) is to create a Link table between Data and Budget, and stuff your Channel & Branch Dimension values into that Link Table. That way you keep them in a single spot. This solution is better because you may want to aggregate Data / Budget per Channel or Branch...

viveksingh
Creator III
Creator III
Author

Thanks for the reply. I cannot rename the fields as I have calculations based onthe column values.
kingsley101
Contributor III
Contributor III

Hi there.

I would Left Join Branch onto Channel and Budget but rename the fields.

If the Channel Code is not referring to a branch code, then rename it instead of joining.

Hope you come right.

 

Kingsley

viveksingh
Creator III
Creator III
Author

Here,the coulmns used to associate among the tables are refering keys
Peter_Cammaert
Partner
Partner

Then try the second suggestion. You know, there were two of them...

viveksingh
Creator III
Creator III
Author

Thanks fir the reply. If I have more than one key that creates synthetic keys. With the keys I can create a link table. But in my case, I have only one key among the tables. Can you help me in creating link table
Peter_Cammaert
Partner
Partner

There are a number of great resources available in the Community that discuss various aspects of Link Tables and their creation:

  • In Generic Keys, HIC discusses what custom-made keys can be used for and how they resolve technical issues (with examples) You'll need Generic Keys to move your common dimensions to a central place, but keep the selections working. See especially Example 3 in the Generic Keys PDF.
  • In MASTERDATA (LINK TABLE or Concatenated FACT Table) you get a short intro for deciding on whether to combine Budget and Actuals or keep them separate. There are also useful links to other blog posts that provide time-saving tips for creating Link tables
  • A basic tutorial for creating Link Tables can be found in Link Table in QlikView - Learn QlikView.

There are many more, but I think if you just read Henric's PDF start to finish, I guess you'll master Link Tables like an expert in no time.