Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Input Max value to field

Hey Community

i need that every load some variable will keep the max value of Field1 at the script.

when i use Let Vvalue=Max(Field1) ; from some reason its not working for me any idea ?

Message was edited by: David Benshimol

1 Solution

Accepted Solutions
Highlighted

Do you want to store the max value based on country or all the fields.?

Try like below,

......

NoConcatenate

Temp:

Load COUNTRY_NAME,

Max( HADERA_YEAR_CONSUMPTION)

Resident QLIKVIEW_COAL_BASKET Group by COUNTRY_NAME;

LET Vvalue= Peek('HADERA_YEAR_CONSUMPTION',0,'Temp');

DROP Table Temp;

EXIT SCRIPT;

View solution in original post

9 Replies
Highlighted
Champion III
Champion III

did u try wit  single quote?

Let Vvalue='Max(Field1)';

Highlighted
Creator
Creator

But it keep me the string Capture.JPG

i need the value

Highlighted

Hi David,

Could you post your script.?

Highlighted
Creator
Creator

I add the script, you can see the yellow at the bottom have a value but i want them every reload reset and have the max value of the fields.

Highlighted

Do you want to store the max value based on country or all the fields.?

Try like below,

......

NoConcatenate

Temp:

Load COUNTRY_NAME,

Max( HADERA_YEAR_CONSUMPTION)

Resident QLIKVIEW_COAL_BASKET Group by COUNTRY_NAME;

LET Vvalue= Peek('HADERA_YEAR_CONSUMPTION',0,'Temp');

DROP Table Temp;

EXIT SCRIPT;

View solution in original post

Highlighted
Creator II
Creator II

Hi,

Please find out attached file.

I think it help full for you..

Highlighted

If you want only max value for the field 'HADERA_YEAR_CONSUMPTION' irrespective of specific fields, you can try like below.

NoConcatenate

Temp:

Load  Max( HADERA_YEAR_CONSUMPTION)

Resident QLIKVIEW_COAL_BASKET;

LET Vvalue= Peek('HADERA_YEAR_CONSUMPTION',0,'Temp');

DROP Table Temp;

EXIT SCRIPT;

Highlighted
Creator
Creator

Thank you this was very helpful

Highlighted

Please note that peek function will not be picked the max value.