Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem in the script? Says Loop formation..!!

Hello ,

I posted the following script

YearsInService:

LOAD * INLINE [

Start_Range, End_Range, YearsInService

0, 1, less than 1

1, 2, 1-2

3, 4, 3-4

5, 6, 5-6

7, 8, 7-8

9, 10, 9-10

10, 25, 10 above

];

Interval:

IntervalMatch([Yrs Service (Svc Dt)]) Load Start_Range, End_Range Resident YearsInService;

But it says the that after running the script the above script you have loops, so this won't work fine. The reason may be because, I used another interval in my script as

AgeRange:

LOAD * INLINE [

Start_Range, End_Range, AgeRange

21, 25, 21-25

26, 30, 26-30

31, 35, 31-35

36, 40, 36-40

41, 45, 41-45

46, 50, 46-50

50, 80, 50 above

];

Interval:

IntervalMatch([Age]) Load Start_Range, End_Range Resident AgeRange;

So thats why it says that there is a loop formation and therefore it shows synthetic keys and the loop.

Please tell me how to resolve this??

Thank you.

1 Solution

Accepted Solutions
gussfish
Creator II
Creator II

Hi,

Your example won't work because, for example, QlikView will interpret

fields with the same name in different tables as being related to each

other e.g. it will link Start_Range in the YearsInService table with

Start_Range in AgeRange (even though you and I know they measure very

different things). You need to name Start_Range and End_Range

differently between the tables e.g. Start_YearsInServiceRange,

End_YearsInServiceRange.

Angus.

View solution in original post

2 Replies
gussfish
Creator II
Creator II

Hi,

Your example won't work because, for example, QlikView will interpret

fields with the same name in different tables as being related to each

other e.g. it will link Start_Range in the YearsInService table with

Start_Range in AgeRange (even though you and I know they measure very

different things). You need to name Start_Range and End_Range

differently between the tables e.g. Start_YearsInServiceRange,

End_YearsInServiceRange.

Angus.

Not applicable
Author

Hi Angus,

Thank you for the answer, I realized that I made some error in the script thats the reason I was getting the error.

Yaman