Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Removing Circular Reference

Hi Team,

I have a confusion in resolving Circular Reference from my Application.

I want the most easiest way to resolve it.

I am giving an example of my Table structure:

Table1:                    Table2:                    Table3

Team,                       City                         Country

Country                      Team                         City

How will i remove circular reference from it. Since, All the columns are important in my application I cannot omit it

Regards,

Priyanka

1 Solution

Accepted Solutions
Peter_Cammaert
Partner
Partner

Use this code to laod your Employees:

Employees:

LOAD EmployeeID,

     LastName,

     FirstName,

     Title,

     TitleOfCourtesy,

     BirthDate,

     HireDate,

     Address,

     City AS EmployeeCity,

     Region,

     PostalCode,

     Country AS EmployeeCountry,

     HomePhone,

     Extension,

     Photo,

     Notes,

     ReportsTo,

     PhotoPath;

SQL SELECT *

FROM NORTHWND.dbo.Employees;

The reasoning is that it's probably not very useful to look at facts for which both the Employee (Sales Executive) and the Customer live in the same city.

Best,

Peter

View solution in original post

19 Replies
Not applicable
Author

You can rename the Country column in any one of the table.

maxgro
MVP
MVP

this can help

Circular References

maksim_senin
Partner
Partner

Hi,

Decision on what to do with data depends not only on the data themselves but also on the goals of the application, so first you should understand whether all of the duplicates play the same role or not. E.g. in one app I have two regions - on is plan region and other is fact region of sales.

Say if your Contry fields play the same role it's more then reasonable to put in into one table, as well as other duplicates. Here we come to the idea of link table but again that depends on your requirements.

Best regards,

Maxim

manideep78
Partner
Partner

Hi Priyanka018

You can rename the any one of the Country Columns or You can go for Loosely coupled tables concept.

Please look for loosely coupled tables concept.

Re: Loosely Couple Table

Circular References

Regards

Manideep

Not applicable
Author

Hi,

Try using LOSSEN TABLE  tablename for one of the tables.

rgvavihs
Specialist
Specialist

Rename Country .

Not applicable
Author

Hi,

      Reaname the fields i.e using alias

      or use Qualify and Unqulify keyword

Example

Table1:

LOAD * INLINE [

    Team, Country

    A, India

    B, AUS

    C, PAK

]
;





Table2:

LOAD * INLINE [

    Team, City

    A, bangalore

   B, Sydeny

]
;



Table3:

Qualify *;

UNQUALIFY City;

LOAD * INLINE [

    Country, City

    India, banglore

    AUS, Sydeny

]
;
UNQUALIFY;

yadav_anil782
Creator II
Creator II

Priyanka  plz go throw this ling for understanding circular loop-

Circular References

jonathandienst
Partner
Partner

There are many ways of resolving the problem, but the real problem is that you need to understand your requirements and your data and decide what you need to do with the 'extra' Country field. Is it:

  • redundant,
  • a different value,
  • one of them can override the other
  • ...

How you handle it is dependent on what it means and what your users will require. You cannot just load and pray.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein