Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to write a load script in qlikview to achieve the max (time) when the if condition is satisfied.
eg- if(ID=1, max(time)) as time but this is not working can anyone guide ?
if ID =1 I need max time when ID=2 I need min time so on..
Table
ID time
1,02:00:00
1,04:55:00
2,2:50:00
2,03:00:00
test:
load * inline [
ID,time
1,02:00:00
1,04:55:00
2,2:50:00
2,03:00:00
](delimiter is ',');
noconcatenate
test1:
load ID,if(ID=1,time(min(time)),time(max(time))) resident test group by ID ;
exit script;
Hi,
Check script below:
DATA_TMP:
LOAD * Inline[
ID, time
1,02:00:00
1,04:55:00
2,2:50:00
2,03:00:00
];
DATA:
LOAD
ID,
Timestamp(IF(ID=1, Min(time),
IF(ID = 2, Max(time))), 'hh:mm:ss') AS Time
Resident DATA_TMP
Group By ID;
Regards,
Vitalii