Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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
Contributor II

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

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.

2 Replies
gussfish
Contributor II

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

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

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

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

Community Browser