Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

circular reference

<body><p>Hi everybody, sorry for this simple (I suppose) question, but I'm new to Qlikview and I'm not sure how to solve it:</p> <p> </p> <p>I have the following 3 tables:</p> <p>Region data:</p> <p> <p>DATE </span>REGION </span>VALUE_R</p> <p>01/01/2010 </span>A </span>10</p> <p>02/01/2010 </span>A </span>20</p> <p>03/01/2010 </span>A </span>30</p> <p>01/01/2010 </span>B </span>11</p> <p>02/01/2010 </span>B </span>21</p> <p>03/01/2010 </span>B </span>31</p> <p>Zone Data:</p> <p> <p>DATE </span>ZONE </span>VALUE_Z</p> <p>01/01/2010 </span>P </span>5</p> <p>02/01/2010 </span>P </span>15</p> <p>03/01/2010 </span>P </span>25</p> <div>Region-Zone Link:</div> <div></div> <div> <div>REGION </span>ZONE</div> <div>A </span>P</div> <div>B </span>P</div> </div> <div></div> <div>If I load them into QV I get a circular reference message. How could I solve the problem? My final objective is to analyze, for each day, regional data at zone level together with zone data. </div> <div></div> <div>Thank you in advance for all your help. </div> </p> </p> <p><col span="2" width="71"></col> <col width="64"></col> <tr height="17"> <td width="71" height="17"><col span="2" width="71"></col> <col width="64"></col> <tr height="17"> <td width="71" height="17"></td> <td width="71"></td> <td width="64"><br /></td> </tr> </td> <td width="71"><br /></td> <td width="64"><br /></td> </tr> </p></body>

2 Replies
Not applicable
Author

Hi,

Here you are a possible solution:


Region_data:
LOAD * INLINE [
DATE, REGION, VALUE_R
01/01/2010, A, 10
02/01/2010, A, 20
03/01/2010, A, 30
01/01/2010, B, 11
02/01/2010, B, 21
03/01/2010, B, 31
];
left join
//Region_Zone_Link:
LOAD * INLINE [
REGION, ZONE,
A, P
B, P
];
// delete the syn table
Region:
load
DATE,
REGION,
VALUE_R,
ZONE,
hash128(DATE,ZONE) as key
Resident Region_data;
Drop table Region_data;
Zone_Data:
LOAD hash128(DATE,ZONE) as key,
VALUE_Z
INLINE [
DATE, ZONE, VALUE_Z
01/01/2010, P, 5
02/01/2010, P, 15
03/01/2010, P, 25
];


I hope it helps you.

Regards.

Not applicable
Author

Hi,

Qlikview automatically connects field with the same name.

Region Data and Zone Data can be linked using the Date (as per your example). So I don't think you need a Region-Zone Link table.