Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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
Luminary Alumni
Luminary Alumni

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.