Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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;
did u try wit single quote?
Let Vvalue='Max(Field1)';
But it keep me the string
i need the value
Hi David,
Could you post your script.?
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.
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;
Hi,
Please find out attached file.
I think it help full for you..
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;
Thank you this was very helpful
Please note that peek function will not be picked the max value.