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: 
gr_eldred
Creator II
Creator II

variable with maximum week

hi I have a qvd that contains a column with the week number.

I need to get the maximum week and put it in a variable.

is it valid to do this?

let vmaxsemana = LOAD

                        max (SemamaYearApple_Number) as SemamaYearApple_Number

                        from

                       Transformation \ Dim \ CalendarApple.qvd;

Can you help me?

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

No, you need to do it like this

MaxTable:

LOAD

     Max(FIELD) as MaxValue

FROM ....;

Let vMaxValue = Peek('MaxValue',0,'MaxTable');

View solution in original post

1 Reply
swuehl
Champion III
Champion III

No, you need to do it like this

MaxTable:

LOAD

     Max(FIELD) as MaxValue

FROM ....;

Let vMaxValue = Peek('MaxValue',0,'MaxTable');