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

Multiple Loops

Hi everyone,

Need some help here.

Imagine that i load 2 tables and want to loop values from the first one in the second one, is that possible?

table1:

load a // String

from ...

table2:

load b // Specific Date

from...

Now i want for each value of a to get all of Data values in b

I thought to do something like to loops but dont know if is possible.

for i = 1 noofrows(table1)

for ii= 1 noofrows(table2)

Not lucky..

Can someone help me?

Regards,

EM

2 Replies
clisboa_noesis
Partner - Creator
Partner - Creator

Hi EM,

I believe you need only to use the exists on the where clause.

Something like:

table1:

load a // String

date(a,'FORMAT') as key

from ...

table2:

load b // Specific Date

b as key

from...

where exists(key);

You need to pay attention to the date format, the key field should be in equal format.

Regards,

Carlos

Not applicable
Author

Thanks.

In the case that i have,

Load Id

        Name

from..

Imagine that i have one ID with 2 names and i want to load the first Name of each ID any suggestion?

Thanks,

EM