Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a double loop like :
For i = 0 to 10
let = Peek (Field1, $(i), Table1)
For j = 0 to 5
let = Peek (Field1, $(i), Table2)
Some code
Next
Next
And it's working fine, and what I need to loop sometimes the only specific field in Table1 and Table2:
Like
Table1 :
id value
1 2
2 4
Table2:
id value
1 2
10 5
To summarize I need loop only id 1 because it's exists in both tables
Thank you
Hi all, I manged it to create separate if condition before second loop, thank you all
Perhaps this?
LET vNoOfDB= FieldValueCount('Table1');
LET vNoOfTables = NoOfRows('Table1');
For i = 0 to 10
let = Peek ('Field1', $(i), 'Table1')
Table1:
Load * Inline [
id, value
1, 2
2, 4
];
For j = 0 to 5
let = Peek ('Field1', $(j), 'Table2')
Concatenate (Table1)
Table2:
Load * Inline [
id, value
1, 2
10, 5
] Where Exists(id,id);
Next j
Next i
Jogi, did Anil's post get you what you needed for your use case? If so, be sure to return to the thread and use the Accept as Solution button on his post to give him credit and let the other Community Members know what worked. If you still require further help, leave an update post.
You may want to try the Design Blog area too if Anil's post did not quite get you all the way there.
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
This area of the Community is mostly how-to posts from our internal experts, so you may find it quite useful in helping you flesh out ideas going forward.
One specific post that may be related is the following I think:
https://community.qlik.com/t5/Qlik-Design-Blog/Preceding-Load/ba-p/1469534
Regards,
Brett
Hi all, I manged it to create separate if condition before second loop, thank you all