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

Expression needed

Hi,

I have table as below and 4 variables. Need expression for below..

LOAD * INLINE [

    IId, Des

    2, Two

    3, Three

    5, Five

    7, Seven

    10, Ten

];

I need first record of the table Des into Var1.

Second record of the Des into Var2 and so on..

1 Solution

Accepted Solutions
Not applicable
Author

Try something like below

LET variable1 = PEEK('Des',0,'Demo');

LET variable2 = PEEK('Des',1,'Demo');

LET variable3 = PEEK('Des',2,'Demo');

LET variable4 = PEEK('Des',3,'Demo');

View solution in original post

4 Replies
Not applicable
Author

Try something like below

LET variable1 = PEEK('Des',0,'Demo');

LET variable2 = PEEK('Des',1,'Demo');

LET variable3 = PEEK('Des',2,'Demo');

LET variable4 = PEEK('Des',3,'Demo');

simondachstr
Specialist III
Specialist III

for i=1 to FieldValueCount('Ild')

Let $('Var'&i)                = peek('Des',$(i))

NEXT i

Not applicable
Author

Hi Martin,

Thanks. It is working.

Not applicable
Author

Hi Kiruthi,

Thanks it is working.