Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Talk to Experts Tuesday, Live Q&A, September 22: Moving from QlikView to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Load a variable from a a field

Hi everybody,

I want to initialize a variable from a field.

I use a script like this :

Capture.JPG

So, i just want to replace the value 5 by the value MaxNumberCommat.

I've tried Let Vi=Max(Comptelesvirgules) just before For i = 1 to 5, but it does not work 🙄

Thanks in advance for your help 

 

 

 

1 Solution

Accepted Solutions
Highlighted

Try this after MaxNumberCommat table

LET vMaxNumberCommat = Peek('MaxNumberCommat');

FOR i =1 to $(vMaxNumberCommat)

View solution in original post

3 Replies
Highlighted

Try this after MaxNumberCommat table

LET vMaxNumberCommat = Peek('MaxNumberCommat');

FOR i =1 to $(vMaxNumberCommat)

View solution in original post

Highlighted
Creator II
Creator II

Hi,

You should use variable to take max value.

After getting max value in table, you should create a variable to carry its value. Then you can use this variable on your for loop.

 

let vMax = peek('MaxNumberCommat');

for i=1 to $(vMax)
.
.

 

 

oops..Sunny is faster than me 🙂

Highlighted
Partner
Partner

Too strong !!! 

Thanks a lot 🍺