Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ksk278074
Contributor III
Contributor III

dynamically loading data

HI experts,

i am having data like below

table:

plant, month,product, sales

a,jan,apple,10

b,feb,mango,20

c,mar,grape,30

d,jun,orange,40

now my question is how to load the data dynamically for all months based on the each plant?

please help me onthe same

9 Replies
PrashantSangle

what do you mean by dynamically over here??

can you give us some more clarity on question?

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
ksk278074
Contributor III
Contributor III
Author

ok will explain my scenario.

i am having issue with loading huge data using bex connector. so now i am loading the based on the filters i.e

i am loading the data for all months based on the each plant.

script :

t1:

load * inline [

plant1

a

b

c

];


for v= noofrows('t1);

for i=0 to $(v)

let vloop= peek('plant1',$(i),'t1')

t2:

load

product,

sno,

cost,

plant

from..... ...$(vloop);

but here the plant values i entered manually  but those values i want dynamically?

lalphonso
Partner - Contributor III
Partner - Contributor III

PrashantSangle

You are in correct direction try below.

Is your plant is input variable while loading data from BEX query???

t1:

load * inline [

plant1

a

b

c

d

];


FOR i = 0 TO NoOfRows('t1') - 1;

LET vPlant = peek('plant1', $(i), 't1');

LIB CONNECT TO .......

t2:

load

product,

sno,

cost,

plant

Select ....

....

variables(

//Pass your variables as $(vPlant)

)

from tableName;

Next i;

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
ksk278074
Contributor III
Contributor III
Author

Yes , loading data from bex connector.

I am able to get the data manually i.e

i have created inline load for plant and do the loop but my question is i want do the dynamically load means no hard coded values ?

PrashantSangle

is your plant is input variable???

Is it compulsory variable or optional??

If it is compulsory variable, then load it from inline table or from excel and loop it for each row, which you are trying now.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
ksk278074
Contributor III
Contributor III
Author

is optional only.

if we write it in inline then how updated plant will come into inline load ?

juraj_misina
Luminary Alumni
Luminary Alumni

Is it possible to load dstinct list of plants from your source as a first step (instead of the inline load) and then loop through that list?

PrashantSangle

If it is optional variable then why you need it fetching load. Just remove it and load all data.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂