Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
tamilarasu
Champion
Champion

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

did u try wit  single quote?

Let Vvalue='Max(Field1)';

Anonymous
Not applicable
Author

But it keep me the string Capture.JPG

i need the value

tamilarasu
Champion
Champion

Hi David,

Could you post your script.?

Anonymous
Not applicable
Author

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.

tamilarasu
Champion
Champion

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;

maniram23
Creator II
Creator II

Hi,

Please find out attached file.

I think it help full for you..

tamilarasu
Champion
Champion

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;

Anonymous
Not applicable
Author

Thank you this was very helpful

tamilarasu
Champion
Champion

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