Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help!! How to reload from a resident table?

Hi, All
i need by clikc on the button to reload from a resident table adding some calculated fields (see attachment)

when i do it like this it works:

if ($(vFlagForReload) = 1)then
data_01:
LOAD * INLINE [
    Field_01, Field_02
    One_1, 1
    OneAndHalf_1, 1.5
    Two_1, 2
    TwoAndHalf_1, 2.5
];

Aux:
Load Max(Field_02) as Max,Min(Field_02) as Min,Avg(Field_02) as Avgg Resident data_01;
Let vMeanValue=Replace(Peek('Avgg'),',','.');
Drop Table Aux;

SecondTable:
NoConcatenate LOAD
Field_01 as p1,
Field_02 as p2,$(vMeanValue) as MeanValue
,1 as val
Resident data_01;
end if

it works

But if i am trying to do it in two steps like this:

//  step 1: load table


if ($(vFlagForReload) = 2)then
data_01:
LOAD * INLINE [
    Field_01, Field_02
    Two_2, 2
    TwoAndHalf_2, 2.5
    Three_2, 3
    ThreeAndHalf_2, 3.5
];end if;


// step 2: find MeanValue ad write it in second table
// it doesnot work


if ($(vFlagForReload) = 3)then

Aux:
Load
     Max(Field_02) as Max,
     Min(Field_02) as Min,
     Avg(Field_02) as Avgg
Resident data_01;
Let vMeanValue=Replace(Peek('Avgg'),',','.');
Drop Table Aux;

SecondTable:
LOAD
Field_01 as p1,
Field_02 as p2,$(vMeanValue) as MeanValue
,1 as val
Resident data_01;
end if

i need many reloads which depends on user's actions... How to manage with the problem?

4 Replies
Not applicable
Author

When you execute the reload = 3 the resident table "data_01" not exists

The resident table "data_01" is created when the reload = 1

Not applicable
Author

>When you execute the reload = 3 the resident table "data_01" not exists

>The resident table "data_01" is created when the reload = 1

yes, i 've seen the message... maybe i dont understand something, but i can see

the table "data_01" pressing Control+T,also i can see its values (right mouse button --> preview)

so its exists somewhere in memory... how can i reload from this table?

PS. well, it was stupid of me

i should use PartialReload,

i suppose, PartialReload doesnot destroy loaded tables

maybe somebody it will be helpful, so i attached correct file

Not applicable
Author

When a new reload is performed, all data in memory are deleted.

So you can retrieve this information at the end of each reload must save the final result in a QVD file.

Every time you run recharging via the buttons, read the previous data from this file QVD.

Not applicable
Author

Thank you, Eduardo, i've manage with the problem, your answers were very helpful