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: 
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?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

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
MVP
MVP

No, you need to do it like this

MaxTable:

LOAD

     Max(FIELD) as MaxValue

FROM ....;

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