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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

set a variable in Script

Hi all,

Please help me with the instructionto set a variable at a script time to get (from SQL table) a variable witha max number from a field and another variable with the minimum valuefrom a field.

Labels (1)
1 Solution

Accepted Solutions
sebastiandperei
Specialist
Specialist

Hi, in first place, you must load the table from SQL:

SQLTable:

SQL Select Distinct Field From Table;

Aux:

Load

     Max(Field) as Max,

     Min(Field) as Min

Resident SQLTable;

Let Var=Peek('Field');

Drop Table Aux;

Try and tell me how it works!!

View solution in original post

2 Replies
sebastiandperei
Specialist
Specialist

Hi, in first place, you must load the table from SQL:

SQLTable:

SQL Select Distinct Field From Table;

Aux:

Load

     Max(Field) as Max,

     Min(Field) as Min

Resident SQLTable;

Let Var=Peek('Field');

Drop Table Aux;

Try and tell me how it works!!

Anonymous
Not applicable
Author

Thanks Sebastian. worked well.